HTTP library
Methods
- GET($host, $uri):
- HEAD($host, $uri):
- POST($host, $uri, $data):
- PUT($host, $uri, $data):
- DELETE($host, $uri):
- OPTIONS($host, $uri):
- TRACE($host, $uri):
- via_proxy($host, $port, $ssl = false):
- add_header($key, $value):
- add_cookie($key, $value):
- simulate_ajax_request():
Example
<?php
$website = new HTTP("www.example.org");
$result = $website->GET("/");
if ($result["status"] == 200) {
print $result["body"];
}
?>