Re: Blocking off access

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 63197
interpreted = N
texte = paul wrote: .... > Dotted IP and normal IPs, in a range format .... Actually I think the dotted ones are the ones that are regarded as "normal." They're a bit tricky to do math with though. .... > 60,000 lines so a lookup would be best I think, If it's the database Will Starck gave us a link to - or similar to it, lookup won't work. The reason is that it gives ip no *ranges* rather than individual ip nos. (a complete ip no. list would be far bigger than 60 000 lines long). So you'll have to use two serch criteria and lookup won't allow that. I wouldn't worry too much though. WebDNA is *FAST*!!! > just need a starting point and I will give it a go Here' a quickie. Should work, but I'm sure somebody can come up with a more elegant solution: [!]Convert ip address to "ip number" and store as a variable named ipnumber[/!] [TEXT]ipnumber=[MATH][ListWords Words=[IPADDRESS]&delimiters=.]([WORD][SHOWIF [INDEX]<4]*256[/SHOWIF][SHOWIF [INDEX]<3]*256[/SHOWIF][SHOWIF [INDEX]<2]*256[/SHOWIF])+[/LISTWORDS]0[/MATH][/TEXT] [!]Search code[/!] [Search db=ip-to-country.db&ipFromtype=num&ipTotype=num&geipFromdatarq=[ipnumber]&leipTodatarq=[ipnumber]&max=1] [Founditems] {Insert whatever code you need to do what you want to do with the nationality data} [/Founditems] [/Search] Dale-List wrote: > > Keep in mind that this won't work for AOL as pretty much all of their > IPs reflect the US, even for european AOL users. True, and there are also surfers who use a proxy in a different country. There's simply no way to make an ip address based nationality identification hundred percent reliable. Frank Nordberg http://www.musicaviva.com ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Blocking off access ( Dale-List 2005)
  2. Re: Blocking off access ( Terry Wilson 2005)
  3. Re: Blocking off access ( Frank Nordberg 2005)
  4. Re: Blocking off access ( "paul" 2005)
  5. Re: Blocking off access ( "paul" 2005)
  6. Re: Blocking off access ( Frank Nordberg 2005)
  7. Re: Blocking off access ( "paul" 2005)
  8. Re: Blocking off access ( Frank Nordberg 2005)
  9. Re: Blocking off access ( "paul" 2005)
  10. Re: Blocking off access ( Frank Nordberg 2005)
  11. Re: Blocking off access ( "paul" 2005)
  12. Re: Blocking off access ( Frank Nordberg 2005)
  13. Re: Blocking off access ( Frank Nordberg 2005)
  14. Re: Blocking off access ( "paul" 2005)
  15. Re: Blocking off access ( Dale-List 2005)
  16. Re: Blocking off access ( "paul" 2005)
  17. Re: Blocking off access ( "Kenneth Grome" 2005)
  18. Re: Blocking off access ( WJ Starck 2005)
  19. Re: Blocking off access ( Donovan Brooke 2005)
  20. Blocking off access ( "paul" 2005)
paul wrote: .... > Dotted IP and normal IPs, in a range format .... Actually I think the dotted ones are the ones that are regarded as "normal." They're a bit tricky to do math with though. .... > 60,000 lines so a lookup would be best I think, If it's the database Will Starck gave us a link to - or similar to it, lookup won't work. The reason is that it gives ip no *ranges* rather than individual ip nos. (a complete ip no. list would be far bigger than 60 000 lines long). So you'll have to use two serch criteria and lookup won't allow that. I wouldn't worry too much though. WebDNA is *FAST*!!! > just need a starting point and I will give it a go Here' a quickie. Should work, but I'm sure somebody can come up with a more elegant solution: [!]Convert ip address to "ip number" and store as a variable named ipnumber[/!] [text]ipnumber=[math][ListWords Words=[ipaddress]&delimiters=.]([WORD][SHOWIF [INDEX]<4]*256[/SHOWIF][SHOWIF [INDEX]<3]*256[/SHOWIF][SHOWIF [INDEX]<2]*256[/SHOWIF])+[/LISTWORDS]0[/MATH][/TEXT] [!]Search code[/!] [Search db=ip-to-country.db&ipFromtype=num&ipTotype=num&geipFromdatarq=[ipnumber]&leipTodatarq=[ipnumber]&max=1] [founditems] {Insert whatever code you need to do what you want to do with the nationality data} [/Founditems] [/Search] Dale-List wrote: > > Keep in mind that this won't work for AOL as pretty much all of their > IPs reflect the US, even for european AOL users. True, and there are also surfers who use a proxy in a different country. There's simply no way to make an ip address based nationality identification hundred percent reliable. Frank Nordberg http://www.musicaviva.com ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Frank Nordberg

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:

when is failing to [URL]ize values in a comparison risky? (1999) Counting LineItems (2000) [ShowIf] if the varieable exists (1998) cart file creation (2003) Location of Webcat site in folder hierarchy (1997) [WebDNA] group searching not working as expected. (2010) LOOP problem (2007) Formatting ModDate (2000) Is [thisurl] http or https? (1998) WebCommerce: Folder organization ? (1997) [Sum] function? (1997) math problems (2000) problems with 2 tags (1997) Pre-flight public flag (1997) taxTotal, grandTotal (1997) Too Much Rootbeer Free Offer (1997) textarea input- nevermind (2002) WebCatalog2 Feature Feedback (1996) WebCatalog can't find database (1997) RE: free zip codes database (1999)