Well I need $ref to display HTTP_REFERER but if there is no referer like if the link was off aim it comes up blank i need it to say like aim.
<?Php
$leech = file('Leech#.txt');
$leech = $leech[0] + 1;
$fa = fopen ("Leech#.txt", "w");
$fb = fopen ("LeechLog.txt", "a");
$ip = $REMOTE_ADDR;
$ref = $HTTP_REFERER;
$info = $HTTP_USER_AGENT;
$date = date("F j, Y, g:i a");
$newline = "\n";
fputs($fb,$newline);
fputs($fb,"Leeching Info: $ip on $date . Settings: $info From: $ref");
fputs($fb,$newline);
fputs($fa, $leech);
echo "";
echo "<head>";
echo "<title>Leecher Cought</title>";
echo "<link href=\"anti leeching/style.css\" type=\"text/css\" rel=\"stylesheet\">";
echo "</head>";
echo "<body bgcolor=\"#efefef\">";
echo "<table width=\"300\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">";
echo " <tr>";
echo " <td>";
echo " <font face=\"Forte\" size=\"5\" color=\"#00AEEF\">";
echo " <center><b>Leecher Cought</b></center>";
echo " </font>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "<br><br>";
echo "<table width=\"300\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">";
echo " <tr>";
echo " <td>";
echo " <font face=\"Arial\" size=\"2\" color=\"#000000\">";
echo " Hey you are seeing this because";
<? php
if ($ref = $HTTP_REFERER) {
print "$ref";
} else {
print "aim";
}
?>
echo "is leeching my files from where you came from and I have put up a anti leecher htaccess file. Please go to <a href=\"http://www.optic-ice.net\">Optic-Ice.net</a> to download this file. Please email the webmaster of this site @ <a href=\"emailto:mike@optic-ice.net\">mike@optic-ice.net</a> telling him you found a site leeching. Thank you.<br><br><br>";
echo " BTW if you came from eminded.org I stopped letting him leech cause I found out that he stole a guestbook script and is claiming it is his.";
echo " <center>$leech diffent time sites have tried leeching.</center>";
echo " </font>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "</body>";
echo "";
?>