Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of mertuarez  >  HTTP client  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: how to use httpclient
Class: HTTP client
Send HTTP requests to Web servers
Author: By
Last change: post method changed
Date: 2010-02-07 09:49
Size: 512 bytes
 

Contents

Class file image Download
<?php
require once 'httpclient.php';
$client = new httpclient;
$url='http://www.example.com/';
//get url
//$client->open($url);

//post url
//$client->open($url," "); //space in post do post method
//$client->open($url,"foo=bar&foo2=bar2");

//inherited cookies
$client->open($url.'login.php',"username=foo&password=bar");
$client->open($url.'view.php?thread=123p'," ");


//show data
$client->show_data();

// echo $client->response_body;

//echo $client->....; //use client variables

?>