Load avatar PHP

How can i get a avatar from people, for example if i type &username=lolgc1 it shows the avatar lolgc1 :slight_smile:
It should be loaded i PHP :blush:

If you want to go with the new Twitch API route just use the Get Users endpoint. it will return the url to the image a json object under the property profile_image_url

Ref: https://dev.twitch.tv/docs/api/reference#get-users

shitty example, something simple

$name = $_GET['username'];
$client_id = ""; //app client id
$json = json_decode(file_get_contents('https://api.twitch.tv/kraken/channels/'. $name .'?client_id='. $client_id));
echo $json->logo;
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.