The result: bool(false)
Thanks jmathai :) On 27 jul, 23:23, jmathai <jmat...@gmail.com> wrote: > JDG is probably correct. > > $ch = curl_init('http://search.twitter.com/search.atom?q=Google'); > curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); > $result = curl_exec($ch); > $sXml = simplexml_load_string($result); > var_dump($sXml); > > On Jul 27, 4:45 pm, oscarva <osca...@gmail.com> wrote: > > > Please help :( > > > On 25 jul, 01:05, oscarva <osca...@gmail.com> wrote: > > > > I am tring to do a Api call using simple xml and twitter search API. > > > > $rss = simplexml_load_file('http://search.twitter.com/search.atom? > > > q=Google'); > > > foreach ($rss->channel->item as $item){ > > > $title = utf8_decode($item->title); > > > $url = $item->link; > > > > } > > > > The error log tells me the following: > > > > PHP Warning: simplexml_load_file() [<a href='function.simplexml-load- > > > file'>function.simplexml-load-file</a>]: I/O warning : failed to load > > > external entity "http://search.twitter.com/search.atom? > > > q=Google" in /home/xxx/public_html/test/status.php on line 10 > > > [error] [client 166.210.xxx.xxx] PHP Warning: simplexml_load_file > > > (http://search.twitter.com/search.atom?q=Google) [<a > > > href='function.simplexml-load-file'>function.simplexml-load-file</a>]: > > > failed to open stream: Connection timed out in /home/xxx/public_html/ > > > test/status.php on line 10 > > > > PHP Version 5.2.8 > > > > This only happens on my server, since in local working properly. :( > > > > Please Help. Thaks ;)