My site offers an online service that uses a custom script. Anyone can use this service, and this script gets its functionality from reading a database on the site. This script is the core of my site.
I have another section of the website that will allow signed in members to modify some of the content in the database. Right now I plan on using a script that directly modifies the database.
I'm also in the process of creating a Firefox add-on that would interact with this database too, and eventually I want to have an iPhone/iPad application that also interacts with this database.
What I'm thinking about is maybe creating an API for this database. And having the member signed in section of the site use a script that doesn't directly interact with the database, but interacts with the API, and that API interacts with the database. And instead of custom scripts for interacting with the iPhone/iPad application, it could also use the API too. That way the member site, the Firefox add-on, and iPhone/iPad add-on would all be using the same gateway with a standard set of rules. I'm thinking that by having this service, it would also enable others to build custom tools and services that would interact with this API, or make it easier to work with contractors on building other official tools in the future.
But my question is, what exactly is an API? Would this be a fair use of it? I'm comfortable with PHP, but is PHP a good language to build an API in? Are there any tutorials one would recommend for building an API?
Thanks