Sometimes it can be useful to do a HTTP GET or HTTP POST request from a PHP script. I used to use curl to do this but there’s a ‘cleaner’ way to do this.
For reference, this is how to do the HTTP POST request in curl from PHP
The PEAR – PHP Extension and Application Repository contains a number of useful reusable PHP components.
The component we are going to use is HTTP_Request2. You … Read more.