fogofogo Posted June 9, 2010 Share Posted June 9, 2010 Hello all I am having a bit of trouble selecting a value from xml. The format of the xml is like this <newplayer> <transaction result="OK"/> <username>Jimbo</username> </newplayer> I am able to print out the value between the username nodes. I just cant figure out how to check what the falue is for result in transaction. I am using this code at the moment... function sendRegistrationPlaytech($URLString) { $url = "https://newplayer.php?" . $URLString; $ch = curl_init(); // set curl options curl_setopt($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_POST, 1); //curl_setopt ($ch, CURLOPT_POSTFIELDS, $form); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $content = curl_exec ($ch); # This returns HTML curl_close ($ch); return $content; } Any help would be great Thanks Link to comment https://forums.phpfreaks.com/topic/204299-php-and-xml/ Share on other sites More sharing options...
syed Posted June 9, 2010 Share Posted June 9, 2010 Whats is the valye of $content? is it an xml response? it is is just use DOM Link to comment https://forums.phpfreaks.com/topic/204299-php-and-xml/#findComment-1069993 Share on other sites More sharing options...
fogofogo Posted June 10, 2010 Author Share Posted June 10, 2010 Thats right - sorry I should have said. It is an xml response. I'm take a look at this DOM business. Thanks! Link to comment https://forums.phpfreaks.com/topic/204299-php-and-xml/#findComment-1070271 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.