Vote count:
0
Im using PHP simplexml to get a VAST xml file from the web. I need to get the values of some elements.
My code is this:
xpath("//Impression/URL"); print_r($result); ?>
Im getting this:
Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [id] => primaryAdServer ) [0] => http://mysite/ads/www/delivery/lg.php?bannerid=7&campaignid=3&zoneid=5&loc=1&cb=2c53ba2469 ) )
I need to get only the url value:
http://mysite/ads/www/delivery/lg.php?bannerid=7&campaignid=3&zoneid=5&loc=1&cb=2c53ba2469
But im not being able to do that. I tried to cast to string but with no success.
Any ideas?
thank you,
fwu
asked 1 min ago
Get value from element using php simplexml
Aucun commentaire:
Enregistrer un commentaire