Login   Register  
PHP Classes

File: get_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  >  get_test.php  >  Download  
File: get_test.php
Role: Example script
Content type: text/plain
Description: Get example script
Class: Advanced HTTP Client
GET, HEAD, POST methods with a lot of features
Author: By
Last change: Applied change for release 1.1 of the class
Date: 12 years ago
Size: 626 bytes


Class file image Download

 * Demonstrates the use of the get() method
require_once( 'http.inc' );
header'Content-Type: text/xml' );
// Grab a RDF file from phpdeveloper.org and display it
$http_client = new httpHTTP_V11false);
$http_client->host 'www.phpdeveloper.org';
    if ( 
$http_client->get'/phpdev.rdf' ) == HTTP_STATUS_OK)
$http_client->get_response_body() );
'Server returned ' .  $http_client->status );

$http_client );