kawahara/httpgetcontents

HTTP Client by filegetcontents()

Installs: 16

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/kawahara/httpgetcontents

0.8.3 2012-09-15 06:05 UTC

This package is auto-updated.

Last update: 2025-10-29 02:14:48 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.