Reputation: 99
I am a PHP programmer and new to RESTful services. I have developed a page which outputs the data in JSON format, based on query parameters (_GET). Now I wan't to implement it so that I can call my script with different parameters via REST API.
My question is, how would I go about implementing the API in PHP. Basically, I am developing this so we can integrate the same data that is there on our website in a different interface for our client sites.
I already have most of data exposed in JSON format, just need guidance on how to implement the RESTful service for that.
Upvotes: 0
Views: 317
Reputation: 1337
Or you could use Slim if you don't like Laravel for some reason. Take a look at https://github.com/victorjonsson/PHP-Rocker it will get you up an running in minutes
Upvotes: 0
Reputation: 791
are you comfortable with php frameworks? than you should give a shot to laravel php framework its is really awesome with low learning curve.
Upvotes: 2
Reputation: 26
You can use json_decode of php and you will get array. You can use decoded array values for further processing. You can make a http post request or curl alternatively to make a rest request.
Upvotes: 1