だから私はPlaystationNetworkAPIからいくつかのデータを取得しようとしてきました、
http://www.psnapi.com.ar/ps3/api/psn.asmx/getPSNID?sPSNID=jameslfc19
だから私はこのコードを使ってきました
<?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;
?>
これはまったく何も出力しません。
@を使用しているのは、それ以外の場合は(はい、わかっていますが、XMLドキュメントに500 Internel Serverエラーがある場合でもデータを取得していると思いました)
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
これを行うための最良の方法は何ですか?@を無視した場合のエラーが問題の原因であると思います。