Created
May 22, 2016 03:02
-
-
Save goedecke/c5e398ef8b409d21719a0e1fdaeccc4c to your computer and use it in GitHub Desktop.
whois basico con PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$domains = array('home.pl', 'w3c.org'); | |
function creation_date($domain) { | |
$lines = explode("n", `whois $domain`); | |
foreach($lines as $line) { | |
if(strpos(strtolower($line), 'created') !== false) { | |
return $line; | |
} | |
} | |
return false; | |
} | |
foreach($domains as $d) { | |
echo creation_date($d) . "n"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment