eg location script www.mydomain.com/api/script/access.js
2.the access.js will call to my server's api(www.mydomain.com/api/index.php),do the authenticate api process and return the result back to client side(if not valid api key,don't allow return result data to the client side.
4. how to i write the api key authentication class at my www.mydomain.com/api/index.php so that only valid api key user can access the result data?
Note:www.mydomain.com/api/script/access.js can be access through embeded into html format like this
Note:Kindly give simple code so that i can more understandable on the flow.
Note:thanks for all guys help solve my problem!!!:)