I'm looking for an example how to emulate XMLHttpRequest client using PHP.
In other words, send the request over HTTP POST message, and receive and process the callback message.
If you want to 'really' simulate an AJAX request, you should, together with all of the above solutions, consider sending this header with your request:
X-Requested-With: XMLHttpRequest
(check the manuals to the solutions how to set custom headers). Prototype, jQuery, mootools and the such all send this header when they request data via AJAX.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With