I have MAMP Pro installed running php 5.2.13. When I try to initialize a HTTP-Request
$r = new HttpRequest('http://example.com/', HttpRequest::METH_GET);
it tells me:
"Class 'HttpRequest' not found in ...".
What do I need to do to 'install(?)' it?
Contemporary Answer for MAMP 2.0 and HTTP_Request2:
Go into your MAMP/bin/php/php5.3.6/bin/ and run
Restart your server and test with the following code, from the PEAR repository:
Don't forget the require_once statement!
You need to enable the extension ...
add the following to your php.ini
Apparently that was asked a lot:
http://php.bigresource.com/Track/php-33sNme7A/
You must enable http extension:
http://www.php.net/manual/en/http.setup.php
Or you can try new HTTP_Request2:
And then: