Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Can't make 2 simplexml_load_file objects?
Index -> Programming, PHP -> PHP Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
abcdefghijklmnopqrstuvwxy




PostPosted: Fri Mar 23, 2007 4:14 am   Post subject: Can't make 2 simplexml_load_file objects?

In my limited knowledge of php I can't figure out why I can't make 2 seperate objects like this:

code:

$xml = simplexml_load_file("http://www.elorating.com/ranking-services/ratingquery?name=" . $player_name .   "&mode=SP&laddertype=1&game=" .   $game);
$xml2 = simplexml_load_file("http://www.elorating.com/ranking-services/ratingquery?name=" . $player_name .   "&mode=SP&laddertype=2&game=" .   $game);


Does anyone see a problem with this?

The difference between them is they are two completely different xml documents. The "laddertype=2" and "laddertype=1" makes this so.
Sponsor
Sponsor
Sponsor
sponsor
abcdefghijklmnopqrstuvwxy




PostPosted: Fri Mar 23, 2007 3:01 pm   Post subject: RE:Can\'t make 2 simplexml_load_file objects?

Here's the error i'm getting

code:

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.elorating.com/ranking-services/ratingquery?name=STALL&mode=SP&laddertype=2&game=2:2: parser error : Start tag expected, '<' not found in


Here is line 19...

code:

$xml2 = simplexml_load_file("http://www.elorating.com/ranking-services/ratingquery?name=" . $player_name .   "&mode=SP&laddertype=2&game=" .   $game);
Display posts from previous:   
   Index -> Programming, PHP -> PHP Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: