diff --git a/action.php b/action.php index 1dee695..b6701fa 100644 --- a/action.php +++ b/action.php @@ -276,6 +276,24 @@ foreach($_GET as $key => $value){ case "userinfo": $info = api_get("accounts/".htmlentities($value)); $rel = api_get("accounts/relationships?id=".htmlentities($value)); + $photos = api_get("accounts/".htmlentities($value)."/statuses?only_media=true&limit=5&exclude_reblogs=true"); + $photo = array(); + $c = 0; + if (!empty($photos)){ + foreach ($photos as $elem){ + if ($elem['media_attachments'][0]['type'] == "image"){ + $photo[$c]['url'] = $elem['media_attachments'][0]['url']; + if ($elem['sensitive'] == true){ + $photo[$c]['s'] = true; + } + $c++; + + } + if ($c == 3){ + break; + } + } + } echo "