WordPress Code Snippets

A fresh mix of code snippets and tutorials

PHP Spoofing Headers with cURL

288

While working on a recent book-sale script, I needed a way to test various request headers. This script is what I used to spoof just about everything except the IP address (which it seems is not possible to spoof via PHP/cURL).

This is pretty much a script used for testing and experimenting, to see what’s possible with cURL. Definitely not anything you would want to just plug into a live, production site. Use for experimenting, customizing, etc., and use in good health.

Note: change the <code> tags to <pre> for better results.


Show Support

Like our new Facebook Page to show support!