Hello, I have no clue on how to get the expiry date and the registrar of a domain. I was wondering how it could be done. I am hoping to not have to scrape results from a place like whois.sc
without the use of special pear modules installed I think probably whois queries are all you have, I dunno if you'll have the ability to execute it on your webhost, so find a website you can query, I think most dont actually allow, or rather limit automation of queries.
So how would I go about scraping results? I mean i could (i think this is possible - i am new to php) query whois.sc/$domain and use regex or something to fond the expiration date. But I really would like to avoid using that. There has to be someway to find registrar and expiry date without scraping. I would prefer not to use a pear modules also
thanks nico, i just found that before you posted it though I was looking through it and from my limited experiance, I can't make heads or tails of it. How much would someone charge to make a little scripts that returned: $expiry = EXPIRY; $registrar = REGISTRAR; from $domain PHP:
Nice find nico <? # Change to path of phpwhois folder, wherever it is define("PHP_WHOIS_PATH" , "phpwhois-4.1.2"); include(PHP_WHOIS_PATH . '/whois.main.php'); function ez( $domain ) { $whois = new Whois(); $data = $whois->Lookup($domain); $return['registrar'] = $data['regyinfo']['registrar']; $return['expires'] = $data['regrinfo']['domain']['expires']; return $return; } $test = ez("digitalpoint.com"); echo "<pre>"; print_r($test); // Just the expires : echo $test['expires']; echo "<br />\n"; echo $test['registrar']; PHP: If you download that whois script from above and dont worry about what's in it just upload the whole folder to the webserver and then upload and unclude that file in your stuff, when ( I assume ) the form is posted, do something like $whois = ez(stripslashes(trim( $_POST['domain'] ))); and then you got the stuff you want ez ... enjoy ...
thanks! I am trying to keep this clean, so could anyone give me a hint as to how to make a single whois query page. I will get all the whois servers for the extensions I need. Then I will pay someone to make a clean file that proccess $domain.$extension, and runs it against the list of whois servers and then parses the expiry and the registrar