Return to Snippet

Revision: 44193
at April 7, 2011 17:35 by xavsio4


Initial Code
$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";
}

Initial URL

                                

Initial Description

                                

Initial Title
Basic PHP WHOIS

Initial Tags

                                

Initial Language
PHP