How to create your own api with PHP and JSON