Internet Marketing Blog - A Day In The
Life Of An Internet Marketer.

IM4Newbies.com Forum Recent Posts ...
Sunday, April 11, 2004
Simple PHP redirect - hit notification script
My good friend Adrian Ling (easybiztools.com) offered up a neat little PHP redirect, that sends you an email notification each time it's clicked.
It also provides the referred site ... as long as your site host has that function enabled.
Either way, it's an easy way to redirect an affiliate URL (or one you'd like to shorten), and the email notification is extra handy if you're tracking hits from from an ad run, split test, or download.
Cut and paste the following code into a blank page, and save it as 'whatever.php'
-------- start ------------
/* =========== start editing ========= */
$domain = "yourdomain.com";
$emailto = "name@yourdomain.com";
$subject = "Ebook Download Hit Report";
$url = "http://www.theurlyouwanttorediertto.com/";
/* ========= end of edit =========== */
$ref = getenv("HTTP_REFERER");
$today = date("d-M-Y [H:i:s]");
$req = getenv("REQUEST_URI");
$req_url = "http://www." . $domain . $req;
$mesg= "Date: $today:\nURL hit: $req_url\nReferred by: $ref\n";
mail("$emailto","$subject","$mesg","From: webmaster@$domain");
header("Location:$url");exit();
?>
-------------- end ------------------
Edit only the following lines in the script above ...
"yourdomain.com" - domain name of the site it's being uploaded to (without the 'http://').
"name@yourdomain.com" - the email address you want the click report sent to.
"Ebook Download Hit Report" - the subject name of the hit report.
"http://www.theurlyouwanttorediertto.com/" - the URL you want to redirect to.
Enjoy!
Mike
PS
Adrian is the man behind easyClickMate, the ultimate ClickBank Affiliate Program management software.
I've arranged for Adrian to give you a special discount, which can only be accessed via this link.
(easyClickMate 4.0 was just recently released ... and it's easily the best version yet).
Top Five Listing For Search Term Internet Marketing Blog In Google Blog Search








