contact form - how can I receive senders ip address?
Below is a simple contact form I am using on my site.
A lot of spam is being sent through it, and i'd like to know the ip addresses of the people / bots submitting the spam so i can ban them through my servers firewall.
What do I add to the php to have it email me the senders ip address?
Thanks in advance
if ($_POST && session_id() == $_POST['sid'])
$name = $_POST['name'];
$email = $_POST['txtEmail'];
$aim = $_POST['aim'];
$phone = $_POST['phone'];
$inquiry = $_POST['Inquiry'];
$message = $_POST['message'];
case 'pricing-sales': $inquiry = "Pricing/Sales"; break;
case 'wdesign': $inquiry = "Design Services"; break;
case 'wupport': $inquiry = "Support"; break;
case 'gquestion': $inquiry = "General Question"; break;