function retrieveProfile()
{
$url = "http://steamcommunity.com/profiles/{$this->steamID64}/?xml=1";
$profileData = simplexml_load_string($url);
if(!empty($profileData->error)) { return NULL; }
$this->friendlyName = (string) $profileData->steamID;
}
警告:simplexml_load_string()[function.simplexml-load-string]:エンティティ:1行目:パーサーエラー:開始タグが必要です、'<'が見つかりません
警告:simplexml_load_string()[function.simplexml-load-string]:http ://steamcommunity.com/profiles/76561197991676121/?xml=1
警告:simplexml_load_string()[function.simplexml-load-string]:^
これはXMLファイルです。
http://steamcommunity.com/profiles/76561197991676121/?xml=1
なぜそれが機能しないのか、そしてはい、<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
ヘッダーがあります!試し$profileData = new SimpleXMLElement(file_get_contents($url))
ましたが、同じ結果になりました。
なぜこうなった ?どうすれば解決できますか?私は3時間検索していますが、役に立たない回答しか表示されません。
エラー: http: //img824.imageshack.us/img824/9464/errorszz.png
EDIT1:simplexml_load_stringは私の間違いの1つでしたが、simplexml_load_fileでさらに多くのエラーが発生します-ドキュメントが空であることを教えてくれます...(真実ではありません!)