Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

pass URL parameters to PHP script or SQL to auhtorize

$
0
0
Hi

Is this possible to call external php script or SQL to perform authorization?
For example:

http:serwer/secure?user=user&pass=pass

location /secure {
if (http://serwer.com/validate.php?user=$arg_user&pass=$arg_pass) {
return 200;
}

return 404;

Generally I would like to get URL parameters, pass it to some external php script that will check in MySQL if that user is active and password is OK, then return OK.

If authentication is OK, user will has access to URL, if not will get 404

Thanks in advance
Regards

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>