I need to return a JSON encoded response to a flash http get request.
In ASP.NET, I do this with a ASHX handler. What's the PHP equivalent ? I mean in order that I only get JSON back, and not the <html> etc.
I need to return a JSON encoded response to a flash http get request.
In ASP.NET, I do this with a ASHX handler. What's the PHP equivalent ? I mean in order that I only get JSON back, and not the <html> etc.
You should put this on top of your script:
header('Content-Type: application/json; charset=utf-8');
header('Content-type: application/json');