400 errors are commonly returned because of rate limiting. You should check the actual message that Twitter is returning.
More info: Status codes: http://apiwiki.twitter.com/HTTP-Response-Codes-and-Errors Rate limiting: http://apiwiki.twitter.com/Rate-limiting On Thu, Jun 25, 2009 at 01:42, 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) [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" > > 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 > > > > > > > -- Abraham Williams | Community Evangelist | http://web608.org Hacker | http://abrah.am | http://twitter.com/abraham Project | http://fireeagle.labs.poseurtech.com This email is: [ ] blogable [x] ask first [ ] private.
