https://github.com/robloach/httpserver
PHP 5.4 HTTP Server wrapper.
https://github.com/robloach/httpserver
Last synced: about 1 year ago
JSON representation
PHP 5.4 HTTP Server wrapper.
- Host: GitHub
- URL: https://github.com/robloach/httpserver
- Owner: RobLoach
- License: mit
- Created: 2012-10-06T19:26:22.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-10-11T17:31:03.000Z (over 13 years ago)
- Last Synced: 2025-03-30T18:02:01.443Z (about 1 year ago)
- Language: PHP
- Size: 105 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
HttpServer
==========
A wrapper around PHP 5.4's HTTP Server.
Requirements
------------
* PHP 5.4
Installation
------------
In your [composer.json](http://getcomposer.org), add the following:
"require" {
"robloach/httpserver": "*"
}
Usage
-----
```php
// 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