Login   Register  
PHP Classes
elePHPant
Icontem

File: proxy_test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of GuinuX  >  Advanced HTTP Client  >  proxy_test.php  >  Download  
File: proxy_test.php
Role: Example script
Content type: text/plain
Description: Request via proxy example script
Class: Advanced HTTP Client
GET, HEAD, POST methods with a lot of features
Author: By
Last change: /
Date: 2002-06-03 11:41
Size: 582 bytes
 

Contents

Class file image Download
<?php
/*********************************************************************
 * Demonstrates the use of requests via proxy
 *********************************************************************/

    
header('Content-Type: text/plain');
    require_once( 
'http.inc' );
    
    
$http_client = new httpHTTP_V11false );
    
$http_client->host 'www.yahoo.com';
    
$http_client->use_proxy'ns.crs.org.ni'3128 );
    if (
$http_client->get'/' ) == HTTP_STATUS_OK)
        
print_r$http_client );
    else
        print(
'Server returned ' $http_client->status );
    unset( 
$http_client );
    
?>