function domain_age($domain){ $ch = curl_init("http://www.who.is/whois/".$domain); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); curl_setopt ($ch, CURLOPT_TIMEOUT, 60); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_REFERER, 'http://www.google.com/search?q=best+community+forum'); $pageout = curl_exec($ch); curl_close($ch); preg_match_all("/<a href=\"([^\"]+)\">([^\"]+)<\/a>/",$pageout,$output); print_r($output); return $output; } PHP: So basically i am trying to fetch everything. I tried a few things to fetch links, text... but no luck http://www.who.is/whois/domainhelpz.com That is the whois page i am getting the data from but what i am looking for is help fetching Registrar: GODADDY.COM, INC. Whois Server: whois.godaddy.com Referral URL: http://registrar.godaddy.com Status: clientDeleteProhibited, clientRenewProhibited, clientTransferProhibited, clientUpdateProhibited Expiration Date: 2012-03-13 Creation Date: 2011-03-13 Last Update Date: 2011-03-13 Name Servers: ns15.domaincontrol.com ns16.domaincontrol.com Code (markup): Mainly though i want the creation date, expiration, last update, and the name servers. Check the page out though to preview what it looks like
Dependant on what your doing I think using a compiled language may be better for this. Using something like C# or C/C++ to retrieve data on this sort of scale.
You have an error on your regexp. preg_match_all("/<a href=\"([^\"]+)\">([^\"]+)<\/a>/",$pageout,$output); The red part should be ([^<]+) Regards