So i've been trying to get some data from a PlaystationNetwork API,
http://www.psnapi.com.ar/ps3/api/psn.asmx/getPSNID?sPSNID=jameslfc19
So I've been using this code
<?php
//Get Username
$username = $_GET["u"];
// Passing the XML
$psnxml = @simplexml_load_file('http://psnapi.com.ar/ps3/api/psn.asmx/getPSNID?sPSNID=' .$username);
$psnname = $psnxml->PSNId->Avatar;
echo $psnname;
?>
This outputs absolutely nothing..
I'm using @ because otherwise I get a (Yes i know, but I thought it would still be getting the data even though the XML doc has a 500 Internel Server Error)
Warning: simplexml_load_file(http://psnapi.com.ar/ps3/api/psn.asmx/getPSNID?sPSNID=jameslfc19) [function.simplexml-load-file]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /Applications/XAMPP/xamppfiles/htdocs/Sigs/PSN2.php on line 6
What is the best way to do this? I'm assuming that the error im ignoring with @ is causing the problem.