Steam web api failed to open stream: connection timed out

I am making a loading screen with PHP using the webhost: x10hosting.com

I am trying to get the users Username and Avatar:


$id = $_GET["steamid"];
$name = "Username";
$avatar = "images/username.png";
if (isset($_GET["steamid"])) {
	$plydata = "http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=APIKEYHERE&steamids=".$id."&format=json";
	$f = file_get_contents($plydata);
	$array = json_decode($f, true);
	if (isset($array["response"]["players"][0]["personaname"]))
	$name = $array["response"]["players"][0]["personaname"];

	if (isset($array["response"]["players"][0]["avatarfull"]))
	$avatar = $array["response"]["players"][0]["avatarfull"];
}

Yes i did put my key in the APIKEYHERE but it is a secret so i did not put it in here so it remains secret.

When joining my server with the loading screen it give the error:

The error appears on line 21. Line 21 of my document is:


$f = file_get_contents($plydata);

x10hosting.com is a free host correct?

if so alot of their get functions on free hosts are blocked

it is. can you recommend me a free one that does allow it?

i do not know of any sadly… what else are you trying to host i could host it its not a problem if its just a loading screen

only thing i would want is the right to use said loading screen and you would have to go through me to edit it if you wanted to change anything

just updated my steamid so click the steam icon <<<<<<<<over there and add me

you could get xammp and host your own webserver and have no ads tho

I added you though steam. AfterShotzZHD