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();
?>
Share Article/Example:
  • DotNetKicks
  • DZone
  • StumbleUpon
  • Print
  • Add to favorites
  • Digg
  • del.icio.us
  • Twitter
  • Facebook
  • LinkedIn
  • Posterous
  • Slashdot

 

 
eXTReMe Tracker