Forum Moderators: coopster
It was a very basic form with no validation as I wasn't very bothered. So then I added an email address field with validation on the domain name. Now they put in a valid email address (domain name anyway).
I'm going to record the ip address using gethostbyname. However, I want to get the actual hostname of the ISP so then I can just ban it. I've tried using gethostbyaddr($IP) and various things but my server doesn't seem to support it as it returns the IP address.
I am going to ignore this for the most part but I just wanted to put something in where I can ban certain hostnames and redirect them etc. Any ideas?
I was also interested in what approaches other people have taken?
Cheers
Manoj
Note: Your web server must be configured to create this variable. For example in Apache you'll need HostnameLookups On inside httpd.conf for it to exist.
Check here first, if possible, and make the necessary changes. Then try using gethostbyaddr [us2.php.net] or $_SERVER['REMOTE_HOST'] again to see what you get.
Good luck!
Assuming it is from a human i'll have to try a different approach.