Write the PHP code yourself?
Kidding aside, you can get the documentation on the PHP API in a few places:
1) It comes with the FileMaker server installation. Look in the FileMaker Server directory (where it's stored) under Examples / PHP / Tutorial for a great "come up to speed" resource.
2) You can get a copy of the docs from Jonathan Stark's web site (http://jonathanstark.com/fm/filemaker-api-for-php-documentation.php). It's a little dated, but most of the basics still work.
3) The PHP manual (http://us.php.net/manual/en/index.php) is a really good resource for just learning about PHP in general (which you need to write anything using the API).