Topic: HOW TO COLLECT IP ADDRESS WITH PHP
HI
how do i collect people who fill out form ip address so i can control spam .
i am currently is using php form to contact me how ever i want to also add there unique ip address when the form is sent to be
here is my file contact.php
<h1><img src='03.png'> Contact Us</h1>
<img src='bigEmail.png' width="170" height="178" style='float:right'>
<img src='customerservice.JPG' width="300" height="300" style='float:right'>
<form name=contactus method=post action='send.php'>
<input type=hidden name=feedback value=1>
Name: <span class=req>*</span><br>
<input type=text name=name style='width:250px'>
<br>
Phone: <span class=req>*</span><br>
<input type=text name=phone style='width:250px'>
<br>Email: <span class=req>*</span><br>
<input type=text name=email style='width:250px'>
<br><br>Your comments: <span class=req>*</span><br>
<textarea name=comment style='width:350px' rows=4></textarea>
<br>
<input type=button value='Send >>' onclick='if (contactusOK()) document.contactus.submit()'>
</form>
and here is my send.php
<?
if (isset($_POST['name']) && !isset($_POST['freequote'])) {
$MSG = 'Contact Us:<br>';
$MSG .= (isset($_POST['name']))? 'Name = '.$_POST['name']."<br>" : '';
$MSG .= (isset($_POST['phone']))? 'Phone = <span dir=ltr>'.$_POST['phone']."</span><br>" : '';
$MSG .= (isset($_POST['email']))? 'Email = <span dir=ltr>'.$_POST['email']."</span><br>" : '';
$MSG .= (isset($_POST['comment']))? 'Comments = '.nl2br($_POST['comment'])."<br>" : '';
$MSG = "<div>$MSG</div>";
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=windows-1255\n";
$headers .= "From: Movers Community <info@moverscommunity.com>\n";
$st = mail('avidanbanks@gmail.com moversleads@gmail.com', 'From website', $MSG, $headers);
header('location: thanks.php');
exit();
were do i put a code to collect the person unique ip address and send it to me so i can see who is on my site ?
please advise

