You need to allow PHP to access 3rd party (external) domains and grab files from them.
In your php.ini you should change this: allow_url_fopen = Off To: allow_url_fopen = On Also, if your host allows you to place php.ini files in the directory just put this in a new php.ini file. [PHP] allow_url_fopen = On On Sun, Aug 30, 2009 at 4:22 PM, chepe263 <chepe...@gmail.com> wrote: > > 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 <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 ;) > -- - Adam Shannon ( http://ashannon.us )