My website worked great for months now and then it started giving out this error
[code][24-Mar-2011 07:58:30] PHP Warning: file_get_contents(http://www.steamcommunity.com/id/alpha123/?xml=1) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: Connection timed out in /home/wegeacom/public_html/mysteam/steam/CreateImage.php on line 19[/code]
This happens to all the users, it was working and I didn't make any changes.
Line 19:
[php]17: if ((!file_exists($xmlpath)) || (time() - filemtime($xmlpath) > $cachetime) || (filesize($xmlpath) < 128)) {
18: $fp = fopen($xmlpath, "w");
19: fwrite($fp, file_get_contents($xmllink));
20: fclose($fp);
21: }[/php]
$xmllink:
[php]$xmllink = "http://www.steamcommunity.com/id/" . $username . "/?xml=1";[/php]
Maybe it's your server? It's still working for me.
[del]You're trying to write to it, you need to open it in reading mode and then read from it.[/del]
[b]Edit:[/b] No you're not, sorry ignore me I'm talking shit again.
Sorry, you need to Log In to post a reply to this thread.