Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8105417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:09:30+00:00 2026-06-06T00:09:30+00:00

The following code is producing the error I stated in the title: $authkey =

  • 0

The following code is producing the error I stated in the title:

        $authkey = "XXXXXXXXXXX";

    if (!isset($_SESSION["steamid"])) {

        $handle = fopen("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=" . $authkey . "&steamids=" . $uid, "r");

        $content = stream_get_contents($handle);

        $stdclass = json_decode($content);

        //var_dump($stdclass);

        $data = get_object_vars($stdclass->response->players[0]);

        foreach ($data as $key => $value) {
            $_SESSION[$key] = $value;
    }

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.

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T00:09:32+00:00Added an answer on June 6, 2026 at 12:09 am

    fopen doesn’t allow remote locations to be opened by default. A more stable method would be to use curl:

    $c = curl_init( sprintf("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=%s&steamids=%s" , $authkey , $uid) );
    curl_setopt( $c , CURLOPT_RETURNTRANSFER , true );
    $stdClass = json_decode( curl_exec( $c ) );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following code is producing an Unsupported operator types error: $data = $modelData +
We have code that is producing the following unhandled exception: Error Message: System.Reflection.TargetParameterCountException: Parameter
I'm trying to implement a simple LinkedList The following code, producing this error: error:
I have the following code which is producing this error. I cannot understand why
Why Is the following code producing error of Object reference not set to an
Following code return error Can't convert String onto integer, please help subject = ['eng','Math','Sci']
The following code fails to compile, producing a Widget must be a non-abstract type
The following code doesn't compile ( error CS0123: No overload for 'System.Convert.ToString(object)' matches delegate
I have the following PHP5 code: $request = NULL; $request->{header}->{sessionid} = $_SESSION['testSession']; $request->{header}->{type} =
I have narrowed down my error to following set of codes producing different behaviour

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.