| # Booking Server Skeleton for PHP |
| |
| This is a reference implementation of |
| [API v3 Booking Server](https://developers.google.com/maps-booking/guides/end-to-end-integration/implement-booking-server) |
| based on PHP |
| |
| ### Prerequisites |
| |
| Requires an installation of |
| |
| * [Apache](https://httpd.apache.org/) |
| * [PHP](https://secure.php.net/) |
| |
| ## Getting Started |
| |
| The Booking Server is implemented using PHP and Apache. To properly route the |
| requests it makes use of the |
| [.htaccess file](https://httpd.apache.org/docs/current/howto/htaccess.html) so |
| make sure that |
| [AllowOverride](https://httpd.apache.org/docs/current/mod/core.html#allowoverride) |
| is enabled for the directory. |
| |
| It is required that you implement an SSL certificate and have all requests |
| served over https. If your server does not already have an SSL certificate setup |
| you can review the |
| [Apache SSL/TLS documentation](https://httpd.apache.org/docs/2.4/ssl/ssl_howto.html). |
| |
| The implementation is also not using protocol buffer libraries, but instead |
| relies on simple JSON serialization methods. |
| |
| To download the project execute the following command: |
| |
| git clone https://maps-booking.googlesource.com/php-maps-booking-rest-server-v3-skeleton |
| |
| The entire code base consists of only three files: |
| |
| * .htaccess instructs apache to route all of the /v3/ requests through |
| bookingserver.php |
| * bookingserver.php handles the request logic, including authentication |
| * apiv3methods.php has the methods implementing API v3 interface |
| |
| After you downloaded the files you should place them in a servable directory. |
| Note that whichever directory you put them in will automatically be the parent |
| to the /v3/ folder (which you do not need to create). |
| |
| ## Testing your Booking Server |
| |
| For instructions on how to test your booking server refer to the |
| [booking server testing](https://developers.google.com/maps-booking/guides/end-to-end-integration/test-booking-server) |
| section of our documentation. It is reccomended that you download and run the |
| [booking test utility](https://maps-booking.googlesource.com/maps-booking-v3/). |
| To install it, follow the provided installation instructions in its README page. |
| |