Thread: Passkey System
View Single Post
  #4  
Old 22-05-13, 00:44
las7h0p3's Avatar
las7h0p3 las7h0p3 is offline
Senior Member
 
Join Date: Jul 2008
Posts: 18
Default
Kinda late but hope this will be helpful to someone.

Put this code:

Code:
<p>Your announce url is: <b><?php echo "$announce_urls[0]?passkey={$CURUSER['passkey']}"?></b></p>
under

Code:
<b><?= $announce_urls[0] ?></b></p>
Bump: Don't know why but I can't edit my previous post.

in upload.php find:

Code:
if (get_user_class() < UC_UPLOADER)
{
  stdmsg("Sorry...", "You are not authorized to upload torrents.  (See <a href=\"faq.php#up\">Uploading</a> in the FAQ.)");
  stdfoot();
  exit;
}
underneath add:

Code:
if (strlen($CURUSER['passkey']) != 32) {

$CURUSER['passkey'] = md5($CURUSER['username'].get_date_time().$CURUSER['passhash']);

mysql_query("UPDATE users SET passkey='$CURUSER[passkey]' WHERE id=$CURUSER[id]");

}
then after:

Code:
<p>Your announce is: <b><?= $announce_urls[0] ?></b></p>
add:

Code:
<p>Your announce passkey is: <b><?= $announce_urls[0] ?>?passkey=<?= $CURUSER['passkey'] ?></b></p>
Reply With Quote