Skip to content

Instantly share code, notes, and snippets.

@goedecke
Created May 22, 2016 03:02
Show Gist options
  • Save goedecke/c5e398ef8b409d21719a0e1fdaeccc4c to your computer and use it in GitHub Desktop.
Save goedecke/c5e398ef8b409d21719a0e1fdaeccc4c to your computer and use it in GitHub Desktop.
whois basico con PHP
<?
$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