I'm currently working on a small application that works like this:
- When the user clicks a link, an Ajax
GET
request is fired. - The request hits a server-side PHP script.
- The script, which requests information for another domain, retrieves a
JSON
feed. - The feed is then echoed back to the client for parsing.
I'm not really a PHP developer, so I am looking for some best practices with respect to cross-domain requests. I'm currently using file
to retrieve the _
get_
contents()JSON
feed and, although it's functional, it seems like a weak solution.