kawahara/httpgetcontents

HTTP Client by filegetcontents()

0.8.3 2012-09-15 06:05 UTC

This package is auto-updated.

Last update: 2024-03-29 02:33:54 UTC


README

This is simple http client that use filegetcontent().

How to use

use HttpGetContent\Client;

$clinet = new Client();
$response = $client->get('http://labs.bucyou.net/ut/test.php?p=test');

// 200
echo $response->getCode();
// 'get'
echo $response->getContents();

$response = $client->post('http://labs.bucyou.net/ut/test.php', array('p' => 'test'));

// 200
echo $response->getCode();
// 'post'
echo $response->getContents();

And, you can use proxy by Client::setProxy();

Enjoy.