how to use proxy with JSON

Posted by Dele on Stack Overflow See other posts from Stack Overflow or by Dele
Published on 2009-09-27T04:14:38Z Indexed on 2010/05/22 7:10 UTC
Read the original article Hit count: 209

Filed under:
|
|

I have a php page called 'dataFetch.php' which sits on one webserver. On another webserver, I have a JS file which issues JSON calls to dataFetch. dataFetch connects to a database, retrieves data and puts it in a JSON format which is fed back to the calling program. In IE, this works fine. In other browsers it does not because of the cross domain restriction.

To get across the cross-domain restriction, I make a call to a file, proxy.php, which then makes the call to dataFetch. My problem now is that proxy.php retrieves the file from dataFetch but the JS script file no longer sees the response from proxy.php as a JSON format and so I can't process it. Can anybody help me out?

© Stack Overflow or respective owner

Related posts about JSON

Related posts about proxy