Create a REST API From a PHP API -
Create a REST API From a PHP API -
i beginner php know of basics. have api website, coded myself, of can phone call different methods different parameters , scour databases relevant information.
however want convert rest.
so instead of having requests http://mywebsite.com/api/?param=allposts have http://mywebsite.com/api/posts/. each of 23 different params.
how this?
one way utilize micro framework routing. 'point' url request patterns relevant php files (controllers) manage requests , serve content (or perform crud operations, or whatever api does).
there's post here give-and-take , farther links.
simplest php routing framework .. ?
i'm in process of using framework silex exact purpose
http://silex-project.org/
it may wish convert php application utilize 1 of many frameworks out there (which handle routing amongst other things).
the usual suspects are
cakephp codeigniter symfony lithiumand there many more...
php api rest
Comments
Post a Comment