Call us Toll-Free:
Live ChatEmail us


Simple File URL Redirect

Code Wizard, 12-30-2006

This script makes it easy to redirect to anotehr page, anotehr site, or a file on the server. It appends it to two seperate files through two seperate variables.

<?php // ver 4.0 FINAL

// By : Andrew Heebner

$fpl = fopen("url_log.txt","a");
$log = sprintf("%s | %s | %s | %s", date("d.M.Y H:i:s"), $HTTP_REFERER, $url, gethostbyaddr($REMOTE_ADDR));
fputs($fpl, "$log<br>

$url = escapeshellcmd($url);
Header("Location: $url")

$fpf = fopen("file_log.txt","a");
$log = sprintf("%s | %s | %s", date("d.M.Y H:i:s"), basename($fid), gethostbyaddr($REMOTE_ADDR));
fputs($fpf, "$log<br>

$fid = escapeshellcmd($fid);
Header("Location: $fid");


Enjoyed this post?

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

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