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 Daniel Kushner  >  HTTPPost  >  example.php  >  Download  
File: example.php
Role: ???
Content type: text/plain
Description: An example use of the HTTPPost class
Class: HTTPPost
Author: By
Last change:
Date: 12 years ago
Size: 487 bytes
 

Contents

Class file image Download
<?php
  
include('./class.HTTPPost.inc');

$arr['name'] = 'Daniel';
$arr['address'] = 'New York';
$arr['email'] = 'daniel@websapp.com';
$arr['foo']['bar'] = 'whatsoever';
$arr['foo']['bar']['query'] = 'something else';

$post = new HTTPPost('http://localhost/tests/HTTPPost/postCollector.php', $arr);
$result = $post->post();

if($headers){
 print nl2br($post->getResponseHeaders());
}

print $result;

/* equivalent to:
 print $post->getResponseBody();
*/


?>