What I want and have
I'm willing to create an API
, I already know what does an API stands for.
I use PHP as a server side language.
However I don't really understand how an API works from scratch, and how can I enable users to use my API
after I created it.
What I think and know
Well right now I think that with an API I enable developers to reach my database and request queries. But then why should I create a full language for it? Why can't they use PHP
or any other server side language?
As I saw, companies who crates API's for their site, they require a registration to give to developers an API KEY. Does the developers log in to database trough this API KEY
? And if yes, then why they don't have a password too? If I know somebody's API KEY I can use it or what?
And as I read/heard XML
is related somehow to API's, but why and how?
Also please consider in your answers that I don't want to use any frameworks or something like that, I want to make it in scratch so I want to understand how it works from A to Z.