Hello World! My first program. (Ps not HW)
The php file can sit on the redirect-to-here dot com server and in godaddy i want to forward to say redirect-to-here dot com/ redirection/ index.php? domain=forward-this-domain1 dot com. I want this whole process to be logged.
So here is my first script written mostly by me ever.
<?php
//variables
$logfile = 'redirections.html';
$redir_url = 'http: redirect-to-here dot com';
$IP = $_SERVER['REMOTE_ADDR'];
$refer = $_SERVER[''];
$domain = array("forward-this-domain1 dot com" => "forward-this2 dot com");
//set logfile output
$logdetails= date("F j, Y, g:i a") . ': ' . '<a href=http: network-tools dot com/default.asp?prog=whois&host='.$_SERVER['REMOTE_ADDR'].'>'.$_SERVER['REMOTE_ADDR'].'</a>' . ' from domain ' . $domain . ' and referrer ' . $refer;
//set var to open logfile
$fp = fopen($logfile, "a");
//main script
fwrite($fp, $logdetails);
fwrite($fp, "<br />");
fclose($fp);
header('Location:' . $redir_url);
exit();
?>
January 5, 2010, 3:09 pm: xx.xxx.xx.xxx from domain Array and referrer January 5, 2010, 3:09 pm: xx.xxx.xx.xxx from domain Array and referrer ##Referral directory if called from a director with no index##
Hope I make sense. And I hope I didnt fudge the code so bad lol. I thought it was going pretty well until it didnt do what I really wanted it to lol.
Ps. didnt mean to obscure the links so much but the forum thought I was trying to spam it. I dont know if any domain other than the network tool is active or owned.
Eight bytes walk into a bar. The bartender asks, âCan I get you anything?â
âYeah,â reply the bytes. âMake us a double.â
** Get my ViralListMachine software now for free and build your own list virally by giving away free stuff @ http://www.virallistmachinegiveaway.com **