Computer Science Canada

Can't make 2 simplexml_load_file objects?

Author:  abcdefghijklmnopqrstuvwxy [ 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.

Author:  abcdefghijklmnopqrstuvwxy [ 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);


: