i am new to php and what i want to do is have an iplogger the logs the ip and if the ip comes back i want it to be redirected to a different site
the script below just take the first and last name and writes it to a file so if this is the first time for that ip then the below script would run.
(what i have is a sign up and people sign up for others is this the best way to prevent this)
Thanks alot for any help
Ben
<?php
$fName = @$_POST["first_name"];
$lName = @$_POST["last_name"];
// Set the string to be written to the file
$values = "<br> $fName $lName\r\n";
// Open the file for truncated writing
$fp = @fopen("enter.html", "a"
or die("Couldn't open organizer.data for writing!"
;
$numBytes = @fwrite($fp, $values) or die("Couldn't write values to file!"
;
@fclose($fp);
echo "Your Name has been added!";
?>
<html>
<head><meta http-equiv="Refresh" content="2;URL=enter.html">
</head>
<body onload="window.open('enter.html','_top')">
</body>
</html>
the script below just take the first and last name and writes it to a file so if this is the first time for that ip then the below script would run.
(what i have is a sign up and people sign up for others is this the best way to prevent this)
Thanks alot for any help
Ben
<?php
$fName = @$_POST["first_name"];
$lName = @$_POST["last_name"];
// Set the string to be written to the file
$values = "<br> $fName $lName\r\n";
// Open the file for truncated writing
$fp = @fopen("enter.html", "a"
$numBytes = @fwrite($fp, $values) or die("Couldn't write values to file!"
@fclose($fp);
echo "Your Name has been added!";
?>
<html>
<head><meta http-equiv="Refresh" content="2;URL=enter.html">
</head>
<body onload="window.open('enter.html','_top')">
</body>
</html>