Hi
Please add
ini_set('allow_url_fopen','On');
in beginning of script.
On Thu, Jun 25, 2009 at 12:12 PM, jey jey <[email protected]> wrote:
>
> Hello
>
> I am tring to do a Api call using simple xml and twitter search API.
> Whwn I am trying to do so i am gettng the following errors
>
> Message: simplexml_load_file(http://search.twitter.com/search.atom?q=
> %40southwestair<http://search.twitter.com/search.atom?q=%0A%40southwestair>)
> [function.simplexml-load-file]: failed to open
> stream: HTTP request failed! HTTP/1.1 400 Bad Request
>
> Message: simplexml_load_file() [function.simplexml-load-file]: I/O
> warning : failed to load external entity "http://search.twitter.com/
> search.atom?q=%40southwestair<http://search.twitter.com/%0Asearch.atom?q=%40southwestair>
> "
>
> here is the code that I am using for
>
> $brand = "southwestair";
> $searchUrl = "http://search.twitter.com/search.atom?q=%40
> ".$brand;
> $results = simplexml_load_file($searchUrl);
> $entry = $results->entry;
> //$result = $this->twitter->search($brand);
> $count = 0;
> print_r($entry);
>
> I am using Amazone aws server, PHP 5.2 version, in my server,
> allow_url_fopen is ON
>
> But its working in my local machine giving the results.
>
> Could please look in to this issu, let me know whats wrong with me
>
> thanks
>
> j0ban
> http://phpqa.blogspot.com
>
>
>
>
>
>
>
--
Regards
Mandakini