Skip to content
/ Buzz Public
forked from kriswallsmith/Buzz

PHP 5.3's lightweight HTTP client

License

Notifications You must be signed in to change notification settings

choult/Buzz

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buzz is a lightweight PHP 5.3 library for issuing HTTP requests.

$browser = new Buzz\Browser();
$response = $browser->get('http://www.google.com');

echo $browser->getJournal()->getLastRequest()."\n";
echo $response;

You can also use the low-level HTTP classes directly.

use Buzz\Message;
use Buzz\Client;

$request = new Message\Request('HEAD', '/', 'http://google.com');
$response = new Message\Response();

$client = new Client\FileGetContents();
$client->send($request, $response);

echo $request;
echo $response;

Before doing any of this you need to register the Buzz class loader.

require_once 'Buzz/ClassLoader.php';
Buzz\ClassLoader::register();

Buzz is tested using PHPUnit. The run the test suite, execute the following command:

$ phpunit test/

About

PHP 5.3's lightweight HTTP client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%