Announcement

Collapse
No announcement yet.

converting ip address to decimal number

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • converting ip address to decimal number

    hi
    can somebody show me how to convert a ip address "201.202.203.204" to a decmial number so i can compare against a database like below to get the country's location.
    thanks
    it has to be there in poffs, but i just cannot locate this code.
    i log all my internet traffic and want to see where traffic is coming from plus i have other uses for it.

    thanks
    paul






    "1002176512","1002242047","APNIC","1103068800","HK","HKG","HONG KONG"
    "1002242048","1002307583","APNIC","1103068800","SG","SGP","SINGAPORE"
    "1002307584","1002373119","APNIC","1103241600","JP","JPN","JAPAN"
    "1002373120","1002405887","APNIC","1103760000","CN","CHN","CHINA"
    "1002405888","1002422271","APNIC","1161648000","JP","JPN","JAPAN"
    "1002422272","1002430463","APNIC","1161820800","AU","AUS","AUSTRALIA"
    "1002430464","1002432511","APNIC","1191196800","AU","AUS","AUSTRALIA"
    "1002434560","1002438655","APNIC","1191196800","CN","CHN","CHINA"
    Last edited by Paul Purvis; 5 Jun 2008, 06:10 PM.
    p purvis

  • #2
    Originally posted by paul d purvis View Post
    hi
    can somebody show me how to convert a ip address "201.202.203.204" to a decmial number so i can compare against a database like below to get the country's location.
    It's just a sequence of four bytes values.
    So, for example:
    Code:
    DecimalAddress = CVL(CHR$(204, 203, 202, 201))
    Bye!
    Last edited by Marco Pontello; 5 Jun 2008, 06:18 PM.
    -- The universe tends toward maximum irony. Don't push it.

    File Extension Seeker - Metasearch engine for file extensions / file types
    Online TrID file identifier | TrIDLib - Identify thousands of file formats

    Comment


    • #3
      thanks Marco
      p purvis

      Comment

      Working...
      X