I've recently been interested in developing my own API which i would like to later use in my other PHP applications i may develop in the future. Sadly i know how they work but i cant think where to start and begin to develop my API. Does anyone know any resources i may look at to help me program my own PHP API.

I would like it to store its data and read it from a MySQL database, basically i would like it to work just like Twitters. I know it will take many years to even get near there standards but the reason why i say Twitter is because its the own example i can think of.

Thank you guys