Re: [WebDNA] IP Address to country
This WebDNA talk-list message is from 2008
It keeps the original formatting.
numero = 100575
interpreted = N
texte = Hi Stuart,column three and four in your database are the decimal representations =20=of column one and two. So you'll just have to convert the IP address =20you want to lookup to decimal, and then search the database.Conversion is simple. To convert the IP address 111.222.333.444 to =20decimal the formula is (111 * 256 * 256 * 256) + (222 * 256 * 256) + =20( 333 * 256 ) + 444.Best,Christer ************************************************************* Christer Olsson PO Box 9160 Phone +46 40 25 85 85 Ljusa Id=E9er AB SE-200 39 Malmo Fax +46 40 25 85 89 Kantyxegatan 5 Sweden http://www.ljusaideer.se23 aug 2008 kl. 15.28 skrev Stuart Tremain:> Hi All>> I have a db of ip address that match a country.>> Here is a sample>> "2.6.190.56","2.6.190.63","33996344","33996351","GB","United Kingdom"> "3.0.0.0","4.17.135.31","50331648","68257567","US","United States"> "4.17.135.32","4.17.135.63","68257568","68257599","CA","Canada"> "4.17.135.64","4.17.142.255","68257600","68259583","US","United =20> States"> "4.17.143.0","4.17.143.15","68259584","68259599","CA","Canada"> "4.17.143.16","4.18.32.71","68259600","68296775","US","United States"> "4.18.32.72","4.18.32.79","68296776","68296783","MX","Mexico"> "4.18.32.80","4.18.40.135","68296784","68298887","US","United States"> "4.18.40.136","4.18.40.143","68298888","68298895","CA","Canada"> "4.18.40.144","4.18.65.255","68298896","68305407","US","United States">> How do I work out the range for the reported ip address.>> If my IP address was 4.17.138.121 it would fall into the fourth =20> record range, is there a trick with the IP address to work out the =20> search range ?>>> Regards>> Stuart Tremain> IDFK Web Developments> 114a/40 Yeo Street, Neutral Bay NSW 2089> ph: +612 9908 2134> fax: +612 9908 2134>>>> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list
.> To unsubscribe, E-mail to:
Associated Messages, from the most recent to the oldest:
Hi Stuart,column three and four in your database are the decimal representations =20=of column one and two. So you'll just have to convert the IP address =20you want to lookup to decimal, and then search the database.Conversion is simple. To convert the IP address 111.222.333.444 to =20decimal the formula is (111 * 256 * 256 * 256) + (222 * 256 * 256) + =20( 333 * 256 ) + 444.Best,Christer ************************************************************* Christer Olsson PO Box 9160 Phone +46 40 25 85 85 Ljusa Id=E9er AB SE-200 39 Malmo Fax +46 40 25 85 89 Kantyxegatan 5 Sweden http://www.ljusaideer.se23 aug 2008 kl. 15.28 skrev Stuart Tremain:> Hi All>> I have a db of ip address that match a country.>> Here is a sample>> "2.6.190.56","2.6.190.63","33996344","33996351","GB","United Kingdom"> "3.0.0.0","4.17.135.31","50331648","68257567","US","United States"> "4.17.135.32","4.17.135.63","68257568","68257599","CA","Canada"> "4.17.135.64","4.17.142.255","68257600","68259583","US","United =20> States"> "4.17.143.0","4.17.143.15","68259584","68259599","CA","Canada"> "4.17.143.16","4.18.32.71","68259600","68296775","US","United States"> "4.18.32.72","4.18.32.79","68296776","68296783","MX","Mexico"> "4.18.32.80","4.18.40.135","68296784","68298887","US","United States"> "4.18.40.136","4.18.40.143","68298888","68298895","CA","Canada"> "4.18.40.144","4.18.65.255","68298896","68305407","US","United States">> How do I work out the range for the reported ip address.>> If my IP address was 4.17.138.121 it would fall into the fourth =20> record range, is there a trick with the IP address to work out the =20> search range ?>>> Regards>> Stuart Tremain> IDFK Web Developments> 114a/40 Yeo Street, Neutral Bay NSW 2089> ph: +612 9908 2134> fax: +612 9908 2134>>>> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to:
Christer Olsson
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Where is the secure setting for text variables? (2003)
check out page (SSL) *still* not loading on Netscape 4.0+ (1999)
Another question about credit cards (1997)
Emailer (1997)
Country & Ship-to address & other fields ? (1997)
SMSI FTP - calander system (2002)
Fwd: Problems with Webcatalog Plug-in (1997)
Page Hanging (2006)
Re:Adding non-SKUs to cart (1998)
I'm having trouble using [url][interpret][math] together in lookup (1997)
Webstar V & OS X (2001)
mail sent from webcatalog. accented chars! (1998)
Text data with spaces in them... (1997)
WebCat2b12 CGI Mac - [shownext] problem (1997)
Tab Charactor (1997)
Sales Tax db (1998)
[format 40s]text[/format] doesn't work (1997)
POST Datamissing? (1998)
Sku numbers (1997)
multi-paragraph fields (1997)