XML Parser Error Start Tag Expected

后端 未结 2 2082
灰色年华
灰色年华 2020-12-21 05:16
function retrieveProfile() 
{
    $url = \"http://steamcommunity.com/profiles/{$this->steamID64}/?xml=1\";
    $profileData = simplexml_load_string($url);

    if         


        
相关标签:
2条回答
  • 2020-12-21 06:05

    You are loading the URL as your XML source. You should have:

    $profileData = simplexml_load_file($url);
    
    0 讨论(0)
  • 2020-12-21 06:13

    Url was changing from steamcommunity.com/profiles/76561197991676121/?xml=1 to http://steamcommunity.com/id/virusbogdan/?xml=1 . Obviously the first link returns null so there was an error. Problem solved !

    0 讨论(0)
提交回复
热议问题