Protect PHP Scripts from unauthorized access -


i'm developing set of php scripts act private api used authorized machines. scripts interface directly mysql database must make sure no public unauthorized access, in making scripts run successfully, possible.

i've been considering different alternatives decided come here different opinions.

i'm running nginx.

the api used externally c# program (using webclient) , few other servers, ips may change, avoiding ip based approach.

i considering passing "key" parameter through post check match

if($_post['key'] == 'key') 

there better alternatives, think?

you can configure tls authorization using client certificates:

flexible , secure.

here tutorial: http://blog.nategood.com/client-side-certificate-authentication-in-ngi


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -