0

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.

3 Answers 3

2

are you comfortable with php frameworks? than you should give a shot to laravel php framework its is really awesome with low learning curve.

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.