You can now generate a server from any valid[**](https://github.com/swagger-api/swagger-codegen/blob/master/README.md#validating-your-swagger-spec) OpenAPI Spec:
After executing this script, you will have an output directory with the server-generated files:
```
$ cd samples/server-generator/php/output
$ find . -type f
./.htaccess
./composer.json
./index.php
./README.md
```
To install the dependencies, cd to the `samples/server-generator/php/output` folder and run:
```
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar install
```
You can now access the api by going to `http://localhost/path-to-output-dir/`. Of course this isn't a fully
runnable server! You have to add the logic in the index.php file. But that's the easy part.
### Making it your own
Running the sample is easy, but how about making your own server? Easy! Just modify the `samples/server-generator/php/PHPServerGenerator.scala` file.
Don't like the templates? Don't worry, we're not offended! They're [mustache](http://mustache.github.com/) templates and are easy to modify.
Take a look at the sample templates here:
<li> - Generator for the index.php file : [api.mustache](https://github.com/swagger-api/swagger-codegen/blob/master/samples/server-generator/php/templates/index.mustache)