robloach / httpserver
Wrapper around PHP 5.4's HTTP Server.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/robloach/httpserver
Requires
- php: >=5.4
- symfony/process: 2.1.*
Requires (Dev)
- guzzle/guzzle: 2.8.*
- phpunit/phpunit: *
This package is auto-updated.
Last update: 2025-10-10 11:58:02 UTC
README
A wrapper around PHP 5.4's HTTP Server.
Requirements
- PHP 5.4
Installation
In your composer.json, add the following:
"require" {
"robloach/httpserver": "*"
}
Usage
// Set up the HTTP web server. $server = new HttpServer\HttpServer('/var/www', 'localhost', 8080); $server->start(); // Do something with it. $contents = file_get_contents('http://localhost:8080/example.php'); // Now that we've done something, let's shut it down. $server->stop();
Testing
php composer.phar install --dev
php vendor/bin/phpunit