Who's Online
We have 5 guests online
Popular
What is my IP? PDF Print
Ferzkopp's Code Snippets
Written by Andreas Schiffler   
Thursday, 28 December 2006 22:05
Online IP finder that goes the extra mile ...

The What is my IP? utility script checks all available IPs in the HTTP request (including proxy IPs).

 

 

The following perl regular expressions are used to check the IP quads:
  # RegExp for IPs
  # Basic decimal digit
  my $ReIpNum = qr{([01]?\d\d?|2[0-4]\d|25[0-5])};
  # Standard IP
  my $ip_match = qr{^$ReIpNum\.$ReIpNum\.$ReIpNum\.$ReIpNum$};
  # Special IPs   
  my $ip_private1 = qr{^10\.$ReIpNum\.$ReIpNum\.$ReIpNum$}; # RFC 3330/1918
  my $ip_private2 = qr{^172\.(1[6-9|2[0-9]|3[01])\.$ReIpNum\.$ReIpNum$}; # RFC 3300/1918
  my $ip_private3 = qr{^192\.168\.$ReIpNum\.$ReIpNum$}; # RFC 3330/1918
  my $ip_loopback = qr{^127\.$ReIpNum\.$ReIpNum\.$ReIpNum$}; # RFC3330/1700
  my $ip_testnet =  qr{^192\.0\.2\.$ReIpNum$}; # RFC 3330  
Last Updated on Thursday, 28 December 2006 22:07
 
Content View Hits : 679626
Copyright © 2010 ferzkopp.net | webmaster (at) ferzkopp (dot) net