title: fopen() returns error: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
body: <p>The following code is producing the error I stated in the title:</p>
  
  <pre><code>        $authkey = "XXXXXXXXXXX";
  
      if (!isset($_SESSION["steamid"])) {
  
          $handle = fopen("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=" . $authkey . "&amp;steamids=" . $uid, "r");
  
          $content = stream_get_contents($handle);
  
          $stdclass = json_decode($content);
  
          //var_dump($stdclass);
  
          $data = get_object_vars($stdclass-&gt;response-&gt;players[0]);
  
          foreach ($data as $key =&gt; $value) {
              $_SESSION[$key] = $value;
      }
  </code></pre>
  
  <p>I've read other questions here on stackoverflow with the same problem, but there never was a real solution to it. The code I posted is in an function that is called in some kind of login-process. If I put the code outside an document and open that document with my web-browser, no error comes up. Also, the code is working on my local machine. But on my server the error comes up. </p>
  
  <p>My local machine runs ubuntu 12.04 with php5, my external server ubuntu 8.04 with php5.
  allow_url_fopen is "On". Any help would be great.</p>