PHP script needed to retrieve domain whois info

Discussion in 'PHP' started by gingerbreadweb, Dec 4, 2008.

  1. #1
    I need a script that takes a domain name and retrieves whois data, such as the registrar name and expiry date. Does anyone know where I can find one?
     
    gingerbreadweb, Dec 4, 2008 IP
  2. xrvel

    xrvel Notable Member

    Messages:
    918
    Likes Received:
    30
    Best Answers:
    2
    Trophy Points:
    225
    #2
    There is a built in class.
    You can search on phpclasses.org.
    There are some classes you can choose some. :)
     
    xrvel, Dec 4, 2008 IP
    gingerbreadweb likes this.
  3. gingerbreadweb

    gingerbreadweb Active Member

    Messages:
    512
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Thanks, I got it working but it only retrieves all the whois info in one big block of text - I need to retrieve individual values as variables, for example registrar name and expiry date - I need each to be a separate variable... any ideas how I can do that?
     
    gingerbreadweb, Dec 4, 2008 IP
  4. xrvel

    xrvel Notable Member

    Messages:
    918
    Likes Received:
    30
    Best Answers:
    2
    Trophy Points:
    225
    #4
    I believe each domain ext (com, net, etc) has its own whois result pattern, so you should check the output patterns for each extension. Thats my only idea.
     
    xrvel, Dec 4, 2008 IP
  5. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #5
    Barti1987, Dec 4, 2008 IP
    gingerbreadweb likes this.
  6. iDemonix

    iDemonix Peon

    Messages:
    37
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Just parse the block for what you need
     
    iDemonix, Dec 4, 2008 IP
  7. gingerbreadweb

    gingerbreadweb Active Member

    Messages:
    512
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #7
    Parse the block?
     
    gingerbreadweb, Dec 4, 2008 IP
  8. irunbackwards

    irunbackwards Peon

    Messages:
    791
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Using regular expressions on this "block of text" you can filter text and output what you need, that's what he meant by parse the block.
     
    irunbackwards, Dec 4, 2008 IP
  9. gingerbreadweb

    gingerbreadweb Active Member

    Messages:
    512
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #9
    Wouldn't that be difficult since the block of text is structured differently depending which extension you are checking?

    Perhaps someone would like to help me do this for a few dollars!
     
    gingerbreadweb, Dec 5, 2008 IP