|
Posted by shotokan99 on 06/26/07 09:48
ah ok let me make it clear. when i said i tried it on a browser...on
the address bar i type directly the query string, with the necessary
parameter. success! it gave a valid response.
but when i try to do it programmatically it doesnt. btw, i tried it
this way also:
$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;
it just gave me a blank page. is there something wrong with my syntax?
i also tried using this sample:
$string = '<?xml version=\'1.0\'?>
<document>
<title>Forty What?</title>
<from>Joe</from>
<to>Jane</to>
<body>
I know thats the answer -- but whats the question?
</body>
</document>';
$xml = simplexml_load_string($string);
var_dump($xml);
still won't run. does it mean my simplexml is disabled? but when i run
phpinfo() it says enable. i cant understand if where i went wrong. pls
help...
Navigation:
[Reply to this message]
|