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

  • Home
  • SEARCH
  • 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 8764041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:55:58+00:00 2026-06-13T15:55:58+00:00

Here is a link to the demo: http://davidwalsh.name/xbox-api I created a php file with

  • 0

Here is a link to the demo: http://davidwalsh.name/xbox-api

I created a php file with the following content..

<?php
// Settings
$gamertag = 'RyanFabbro';
$profileUrl = 'http://www.xboxleaders.com/api/profile/'.$gamertag.'.json';

// Get information about me
$info = file_get_contents($profileUrl);

// To JSON
$json = json_decode($info);
$user = $json->user;
?>    

Here is what its supposed to look like when i load the file (except with my gamertag data)

{
  "status": {
    "is_valid": "yes",
    "is_cheater": "no",
    "tier": "gold"
  },
  "profile": {
    "gamertag": "dwalsh83",
    "gamerscore": 300,
    "reputation": 20,
    "gender": "male",
    "motto": "Watch your head.",
    "name": "David Walsh",
    "location": "Madison, WI, US",
    "bio": "There is, and only can be, Call of Duty.",
    "url": "http:\/\/live.xbox.com\/en-US\/Profile?gamertag=dwalsh83",
    "avatar_tile": "http:\/\/image.xboxlive.com\/global\/t.fffe07d1\/tile\/0\/2000b",
    "avatar_small": "http:\/\/avatar.xboxlive.com\/avatar\/dwalsh83\/avatarpic-s.png",
    "avatar_large": "http:\/\/avatar.xboxlive.com\/avatar\/dwalsh83\/avatarpic-l.png",
    "avatar_body": "http:\/\/avatar.xboxlive.com\/avatar\/dwalsh83\/avatar-body.png",
    "launch_team_xbl": "no",
    "launch_team_nxe": "no",
    "launch_team_kin": "no"
  }
}

But it is not displaying anything, what am i doing wrong?

When I go to http://www.xboxleaders.com/api/profile/ryanfabbro.json, it displays fine.

Uodate*

i tryd doing this in a php file

<?php
// Settings
$gamertag = 'RyanFabbro';
$profileUrl = 'http://www.xboxleaders.com/api/profile/'.$gamertag.'.json';

// Get information about me
$info = file_get_contents($profileUrl);

// To JSON
$json = json_decode($info);
$user = $json->user;
$user = $json->profile;
$user = $json->data;
$profile = $json->data;
?>

<img src="<?php echo $profile->avatar_body; ?>" alt="<?php echo $profile->gamertag; ?>" class="avatar" />

this resulted in the page still being blank so when i viewed the source all it returned was

<img src="" alt="" class="avatar" />

update 2 @ae14 & 2g

i also tried (all in 1 php file)

<?php
// Settings
$gamertag = 'RyanFabbro';
$profileUrl = 'http://www.xboxleaders.com/api/profile/'.$gamertag.'.json';

// Get information about me
$info = file_get_contents($profileUrl);

// To JSON
$json = json_decode($info);
$user = $json->data;
?>

<?php echo $user->name ?>

which still resulted in a blank page, is that what you were meaning i should do? i also tried this same way with 2g suggestion to no avail

  • 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-13T15:55:59+00:00Added an answer on June 13, 2026 at 3:55 pm

    This is my PHP file :

    <?php
    // Settings
    
    $gamertag = urlencode('yourgamertagwithspaceetcetc..');
    
    $profileUrl = 'http://www.xboxleaders.com/api/profile/'.$gamertag;
    
    // Get information about me
    $info = file_get_contents($profileUrl);
    
    echo $info;
    
    // To JSON
    $json = json_decode($info);
    $user = $json->Data;
    
    echo $user->Gamertag;
    
    ?>
    

    I’ve to use urlEncode beacause my gamertag had a spaces inside. I suggest you to test the final url on the browser before start the php file.

    For test use $user->Gamertag because Name’s property it’s always blank.. I don’t know why.

    This is JSON Data returned from the service

     "Data": {
        "Tier": "gold",
        "IsValid": 1,
        "IsCheater": 0,
        "IsOnline": 0,
        "OnlineStatus": "Last seen 11\/10\/2012 playing Modern Warfare&#174; 3",
        "XBLLaunchTeam": 0,
        "NXELaunchTeam": 0,
        "KinectLaunchTeam": 0,
        "AvatarTile": "https:\/\/avatar-ssl.xboxlive.com\/avatar\/xxxxxxxx\/avatarpic-l.png",
        "AvatarSmall": "http:\/\/avatar.xboxlive.com\/avatar\/xxxxxx\/avatarpic-s.png",
        "AvatarLarge": "http:\/\/avatar.xboxlive.com\/avatar\/xxxxxx\/avatarpic-l.png",
        "AvatarBody": "http:\/\/avatar.xboxlive.com\/avatar\/xxxxxxx\/avatar-body.png",
        "Gamertag": "xxxxxxxxxxxxxxxxx",
        "GamerScore": 4165,
        "Reputation": 20,
        "Name": "",
        "Motto": "",
        "Location": "",
        "Bio": ""
      },
      "Stat": "ok",
      "In": 2.273,
      "Authed": "false",
      "AuthedAs": null
    

    You can access using the same method for the Gamertag… simpy call

    $user->AvatarSmall
    

    I don’t had php installed on my machine so first I’ve downloaded the PHP 5.4.8 for Windows and I’ve used the Built-in web server of this release Here more info.

    Hope can help you

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website that uses ajax jquery and facebox. Demo here : http://temp.nevergone.eu/facebox.php
Here is a link to my code: http://jsbin.com/ebadic/9/edit It is from a demo I
Here is the demo link : http://cistrome.org/cps/sequences?did=2653&Gene_box=&region_select=proximal&distance_nearest_bp_number=5000&distance_further_bp_number=0&displaygenes=genesymbol&extend_bp_number=200&repeat_bp_number=150 : When you first enter the page,
Here is the link http://alvotechnologies.com/demo/fungi/ when resizing the window, swf objects overlaps??
Here is link where i got a code for web-page content fetching. But i
here is link to an example: http://techchorus.net/demos/jquery/hiding-input-elements-in-a-div.html It actally disables few elements on click
I'm learning by reading this tutorial: Link Here's the code: <?php require_once 'Zend/Loader.php'; class
Here is the link for my html http://jsfiddle.net/9rprY/18/ In this I need the middle
<DIV id=gallery2> <DIV class=center_content> <A id=example2 class=photo-link title=567 href=http://www.hdwallpapersarena.com/wp-content/uploads/2012/06/Desktop-wallpaper-Free-honey-bee1.jpg rel=group1 smoothbox?> <IMG id=mygal class=mygalclass
Here's a live demo for your convenience: http://jsfiddle.net/Lr6NQ/2/ On ul#navigation ul , if there

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.