<?php
include('http.php');
include('gHttp.php');
/*
#Examples of how to user this class with a proxy
$proxy['host']="proxy.host.com";
$proxy['port']="3128";
$proxy['user']="user";
$proxy['pass']="password";
$proxy['realm'] ="proxyrealm" ;
$proxy['mech']=""; #Proxy proxy_authentication_mechanism
*/
$f = fopen("ghttp://www.cesarodas.com/","r");
if ($f === false) {
print "Error: ".$gHttpErr;
}
print_r($headers);
while ( $body = fread($f, 1024) )
print $body;
fclose($f);
/*
** This will work only with PHP 5.
** The php stream wreaper http is unset
** and ghttp handle http queries.
*/
$f = fopen("http://www.cesarodas.com/","r");
print_r($headers);
while ( $body = fread($f, 1024) )
print $body;
fclose($f);
?>
|