Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   userid in with passkey announce.php (http://www.bvlist.com/showthread.php?t=8617)

sharpie 13th December 2012 16:43

userid in with passkey announce.php
 
How do i tie the passkey to the user id in this piece of code without the userid anyone can get hold of a passkey and use it

so basically when a user downloads it checks the userid and passkey are the same for that user so for example

userid=5 passkey=12345 << system checks both id and passkey can download

userid=6 passkey=12345 << system checks both id and passkey blocks download because passkey is different to that user in database


Code:

$rz = mysql_query("SELECT id, uploaded, downloaded, class, downloadpos, enabled, parked FROM users WHERE enabled = 'yes'". (ENA_PASSKEY ? "AND passkey=$passkey ":''). "ORDER BY last_access DESC LIMIT 1");

if ($MEMBERSONLY && mysql_num_rows($rz) == 0)

err("Unknown passkey. Please redownload the torrent from $BASEURL.");

Thanks


All times are GMT +2. The time now is 18:11.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.