Posted by shotokan99 on 06/26/07 05:41
i have this situation:
i was given a query string : http://mywebservice.com?url=<xurl>
where
xurl=is a valid url. now what the query string does it will display
an
xml on the page. like this one:
<?xml version="1.0" encoding="UTF-8" ?>
<response...>
..
..
..
</response>
now i made a script that looks like this:
$xmyurl='http://myurl.com?xxxx=xxxx;
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$xmyurl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$xresult=curl_exec($ch);
curl_close($ch);
$xml = new SimpleXMLElement($xresult);
echo $xml->url[0]->localUrl;
when i tried to run, nothing is being displayed...what could have gone
wrong?
[Back to original message]
|