Identifying site visitors with no IP address

I see traffic come through all the time from Paris France and China like this. Here is an example:

apparently he is in Shangai. I’ve also looked at all these:

is there any way to stop MOST of this without restricting people in every country who would be interesting in contacting the site owner who is the victim of stuff like this?

Take a look at the FILTER_VALIDATE_IP filter extensions for php.
There are many filters

$ip = “”;

if (filter_var($ip, FILTER_VALIDATE_IP)) {
echo("$ip is a valid IP address");
} else {
echo("$ip is not a valid IP address");

You can find out what filters are available in your php installation with:

foreach (filter_list() as $id =>$filter) {
echo ‘ ’ . $filter . ‘ ’ . filter_id($filter) . ‘ ’;

thanks much! I will do this.

Sponsor our Newsletter | Privacy Policy | Terms of Service