You are here: Re: accessing web service... « PHP Programming Language « IT news, forums, messages
Re: accessing web service...

Posted by shimmyshack on 06/26/07 14:48

On Jun 26, 10:48 am, shotokan99 <soft_devj...@yahoo.com> wrote:
> 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...

have you tried disabling (after removing) the cookies for that site,
adn setting the user agent string yet? or tried using wget to obtain
success at the comand line when using the same URL you used in the
browser, if wget works then cURL should, if not then its time to do
the cookie and user agent thing

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация