Hello, i have a question, How use it with xml api format??? See, i'm using the http://twitter.com/statuses/friends_timeline.xml to get the friends timeline for my app but i don't know how use it the data with SimpleXML
Please help!! chepe263 On Jul 27, 10:23 pm, jmathai <[email protected]> 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 <[email protected]> wrote: > > > Please help :( > > > On 25 jul, 01:05, oscarva <[email protected]> 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 ;)
