PHP/HTML/HTTP Request

Материал из Web эксперт
Перейти к: навигация, поиск

Fetching a URL with HTTP_Request

   <source lang="html4strict">

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

 </source>