I am curious how I could make a PHP script where you pass your username and password to my webserver and it downloads a file (or multiple) that is specific to that one user only. I am not sure where to start. Could someone please help? thanks!
Share
Here it is:
http://www.php.net/manual/en/function.readfile.php
You shouldn’t put a password directly in the URL. Instead, use a random generated token, for example using MD5 (
$token = md5($username.time());). So, your user table should look like this :The URLs you’ll provide to your user will be like this :
And download.php: