PDA

View Full Version : Retrieve Avatar From Outside Script


datarecall
06-22-2012, 04:07 PM
Hey Guys,

I am creating an outside script, I have the userid and username of the logged in user but I am having troubles figuring out how to grab the users avatar. Any help would be appreciated.

image.php?u=1 seems like you can use that but that only gets custom avatars, if they dont have a custom avatar it just shows up blank.

Thanks

Scanu
06-24-2012, 10:17 AM
You should put a condition that if there is not url, use the unknow image see this example

if (!$url)
{
$url = "images/misc/unknown.gif";
}

I think this should works, maybe if you put your code it's better :)