Welcome! Log In Create A New Profile

Advanced

pass URL parameters to PHP script or SQL to auhtorize

Posted by marcins 
pass URL parameters to PHP script or SQL to auhtorize
January 19, 2015 10:01AM
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
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 273
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready