![]() |
Api
How would I construct an API system, kinda like facebook?
Couldn't search for it because it was too short.. I really have no idea how to start so.. yea. :) |
you are looking for a "content management system"
|
A basic API is really just a web interface (data wise), but you send the data in a RESTful way (xml,json,php). You just need to create a system that will respond to requests and provide the needed data.
If you're still stuck look through some of these examples: Vimeo simple API or Twitter API. Really, a good example of an 'api' is any RSS/XML feed, all they are is data which your RSS reader parses and displays. |
Years of people's lives have been spent answering that question, it can't be done in one post here. As Adam said, look though those examples and begin to piece it together yourself.
|
If you are already using a MVC framework, like dingo or CI, then implementing a twitter-like api shouldn't be too difficult. For example let's say you have a page URL like so:
Code:
user/view/evanCode:
user/view/evan/xmlPHP Code:
PHP Code:
|
For starters I would recommend creating a db of static content, then have one page accept all of the requests. That page should take in at least a method parameter. You would then want to query the db to grab the results and then parse them out.
Code:
MySQL TablesPHP Code:
|
This link, should give you some ideas..
http://www.webresourcesdepot.com/how...-10-tutorials/ |
| All times are GMT. The time now is 02:57 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0