Skip to content

RobLoach/httpserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HttpServer

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

About

PHP 5.4 HTTP Server wrapper.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages