[twitter-dev] Re: XML parsing error when using JSON search.twitter.com/search.json?

2009-10-25 Thread EastSideDev
I am having similar problems using file_get_contents, with certain API calls, and JSON, but it works fine with other API calls. On Oct 24, 10:11 am, TrixJo tri...@gmail.com wrote: Hello I am trying to search twitter content using a mySQL/PHP entry in a table: $contents = file_get_contents(

[twitter-dev] Re: XML parsing error when using JSON search.twitter.com/search.json?

2009-10-25 Thread TrixJo
I have used the ampersand which is displayed in my code here: http://pastebin.com/m51f7a9dd are there any other takers who can give me advice on why I get the errors: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden On Oct 24, 1:23 pm, Mark Mcbride mmcbr...@twitter.com

[twitter-dev] Re: XML parsing error when using JSON search.twitter.com/search.json?

2009-10-25 Thread EastSideDev
For what it's worth (if it helps debug the problem), my code was working just fine, until about two weeks ago, and then the same piece of code, started returning the failed to open stream error. On Oct 25, 10:20 am, TrixJo tri...@gmail.com wrote: I have used the ampersand which is displayed in

[twitter-dev] Re: XML parsing error when using JSON search.twitter.com/search.json?

2009-10-25 Thread Michael Steuer
You're getting 403 errors from Twitter. You're being rate limited because you're not passing a user agent. From the search API wiki: Applications must have a meaningful and unique User Agent when using this method. A HTTP Referrer is expected but not required. Search traffic that does not

[twitter-dev] Re: XML parsing error when using JSON search.twitter.com/search.json?

2009-10-24 Thread JDG
You sure that's where the error is? there have been numerous reported problems with PHP's JSON decoder that it doesn't handle the very large numbers of Twitter's IDs well. On Sat, Oct 24, 2009 at 11:11, TrixJo tri...@gmail.com wrote: Hello I am trying to search twitter content using a

[twitter-dev] Re: XML parsing error when using JSON search.twitter.com/search.json?

2009-10-24 Thread Dewald Pretorius
Isn't it because you are trying to process a JSON object as XML data? Dewald On Oct 24, 2:11 pm, TrixJo tri...@gmail.com wrote: Hello I am trying to search twitter content using a mySQL/PHP entry in a table: $contents = file_get_contents(                    

[twitter-dev] Re: XML parsing error when using JSON search.twitter.com/search.json?

2009-10-24 Thread TrixJo
JDG, I am certain that is where the error is coming from because the error supplied by the browser is pointing at my query string Dewald, I am processing the data via JSON into an array I then take that array and simply echo the relevant errors into XML format (because I have other queries

[twitter-dev] Re: XML parsing error when using JSON search.twitter.com/search.json?

2009-10-24 Thread JDG
OH. I see what you're saying now. Again, the problem isn't with indonesia ... it's the fact that you're putting in an xml tag. You need to change it to amp; On Sat, Oct 24, 2009 at 11:55, TrixJo tri...@gmail.com wrote: JDG, I am certain that is where the error is coming from because the

[twitter-dev] Re: XML parsing error when using JSON search.twitter.com/search.json?

2009-10-24 Thread TrixJo
Ok. Thanks. I changed it to amp; Still now working. I am trying to query Twitter content and then display my query in XML format. To get a better idea of what I am trying to do I have pastebin'd the code: http://pastebin.com/m51f7a9dd The error I am getting is that my file_get_contents()

[twitter-dev] Re: XML parsing error when using JSON search.twitter.com/search.json?

2009-10-24 Thread Mark Mcbride
If you're embedding that URL in XML you will need to XML encode it... In this specific case the ampersand (q=...) needs to be replaced with amp; Sent from mobile device On Oct 24, 2009, at 10:19 AM, JDG ghil...@gmail.com wrote: You sure that's where the error is? there have been numerous