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?
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 &quot;http://search.twitter.com/search.atom?
q=Google&quot; 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
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 ;)

Reply via email to