Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #1  
Old 13th December 2012, 16:43
sharpie sharpie is offline
Senior Member
 
Join Date: Apr 2012
United Kingdom
Posts: 17
Default 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
Reply With Quote
Reply

Tags
announcephp , passkey , userid

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 17:04. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.