Call us Toll-Free:
1-800-218-1525
Email us

 Sponsors

Simple Redirection Script Logs URL

Code Wizard, 12-30-2006



<?
//
// use the script in the below manner:
// http://yourserver.com/out.php3?url=h...therserver.com
//
// By Andrew Heebner/Evil Walrus
//
$logfile = "/path/to/logfile.txt";
//
// Function used to count and log the counts to URL
//
function GoCount(){
$fp = @fopen($logfile, "a");
fputs($fp, "$url");
fclose($fp)
}
//
// Check if file exists before executing function
//
if(file_exists($logfile)) {
GoCount();
Header("Location:$url");
} else {
print("<b>Redirect Error:</b> $logfile not found or permissions are not correct");
}
//
// If format is improper, notify the redirector
//
if(!($url)) {
print("<b>Redirect Error:</b> No URL Specified!");
}

?>
Enjoyed this post?

Subscribe Now to receive new posts via Email as soon as they come out.

 Comments
Post your comments












Note: No link spamming! If your message contains link/s, it will NOT be published on the site before manually approved by one of our moderators.



About Us  |  Contact us  |  Privacy Policy  |  Terms & Conditions