Online Code Generator

PHP and Javascript Code Snippets for Common Uses

Free PHP REST API Starter Script

This script will help you create a versatile and extensible PHP-based REST API for any project you may have.


  • Output formats of PHP, JSON, JSONP, XML or TEST (a print_r of the result)
  • Used on many of my own sites
  • Easy to read & easy to expand upon
  • The ability to validate API keys explained


Unzip the contents of the zip file into it's own folder on your web server. Edit the sample_call.php file's SQL statement to pull the data you need from your database.

Please note that in order to keep this script simple to read, there is not much security being done. Please always sanitize and validate any data being passed in via $_GET.


You can download this script here: (2KB)

mobil porno porno izle sex izle