0

I am working on a site to allow users to download a file. I am looking for a script that lets me identify the referrals who are sending visitors to my site by their identifiers download.php?id=555. i want to identify the nbr of downloads of each partner. Thanks a lot

Nizar Barkallah
  • 109
  • 1
  • 5
  • 11

1 Answers1

1

Simply you have to include a php script file in every page of your website. This script will look for a url parameter, let we say, referalId by $_GET['referalId'] if it is found and It has a valid value, you have to do some action in your databse.

if (isset($_GET['referalId'] && isValid($_GET['referalId')){
  //doSomeThing In The DB.
}

Notice isValid should be custom defined function to validate the value of the $_GET[referalId'] value to prevent and other unsuitable values

SaidbakR
  • 13,303
  • 20
  • 101
  • 195