Fetching a URL with HTTP_Request

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

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.