[ 'https' => '91.209.25.156:8080' #this is a dummy example, change with your proxy #'https' => 'login:password@ip:port ] ]); $data = $client->request('GET', 'https://api.ipify.org?format=json'); $dataIp = json_decode((string)$data->getBody()); echo 'IP for Instagram requests : ' . $dataIp->ip . "\n"; $dataRealIp = json_decode(file_get_contents('https://api.ipify.org?format=json')); echo 'Your IP : ' . $dataRealIp->ip . "\n"; $api = new Api($cachePool, $client); $api->login($credentials->getLogin(), $credentials->getPassword()); $profile = $api->getProfile('robertdowneyjr'); echo '============================' . "\n"; echo 'User Information : ' . "\n"; echo '============================' . "\n"; echo 'ID : ' . $profile->getId() . "\n"; echo 'Full Name : ' . $profile->getFullName() . "\n"; echo 'UserName : ' . $profile->getUserName() . "\n"; echo 'Following : ' . $profile->getFollowing() . "\n"; echo 'Followers : ' . $profile->getFollowers() . "\n"; echo 'Biography : ' . $profile->getBiography() . "\n"; echo 'External Url : ' . $profile->getExternalUrl() . "\n"; echo 'Profile Picture : ' . $profile->getProfilePicture() . "\n"; echo 'Verified Account : ' . ($profile->isVerified() ? 'Yes' : 'No') . "\n"; echo 'Private Account : ' . ($profile->isPrivate() ? 'Yes' : 'No') . "\n"; echo 'Medias Count : ' . $profile->getMediaCount() . "\n"; echo '============================' . "\n"; } catch (InstagramException $e) { print_r($e->getMessage()); } catch (CacheException $e) { print_r($e->getMessage()); }