Fetching a URL with HTTP_Request : HTTP_Request « HTML « PHP






Fetching a URL with HTTP_Request

 
<?php
require_once 'HTTP/Request.php';
$r = new HTTP_Request('http://www.example.com/robots.txt');
$r->sendRequest();
$page = $r->getResponseBody();
?>
  
  








Related examples in the same category