XFileSharing Pro - tracking referrals

Message
Author
nik0la
Posts: 102
Joined: Dec 30, 2009 1:50 pm

tracking referrals

#1 Postby nik0la » Aug 24, 2010 6:32 pm

is it possible to track referrals based on unique token added at the end of download file link

ex:

http://mysite.com//bd0d24183997/opera-s ... affil=1234[/b]

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#2 Postby PilgrimX182 » Aug 25, 2010 2:37 pm

Try this out: in index_dl.pm find

Code: Select all

   if($file->{usr_id})
   {
      $ses->setCookie("aff",$file->{usr_id},'+14d');
   }
and add below:

Code: Select all

   if($ENV{REQUEST_URI}=~/affil=(\d+)/)
   {
      $ses->setCookie("aff",$1,'+14d');
   }