Check domain creation date


/ Published in: PHP
Save to your folder(s)

simple one minute, you must have whois on your system


Copy this code and paste it in your HTML
  1. <?php
  2. $domains = array('home.pl', 'w3c.org');
  3.  
  4. function creation_date($domain) {
  5. $lines = explode("\n", `whois $domain`);
  6. foreach($lines as $line) {
  7. if(strpos(strtolower($line), 'created') !== false) {
  8. return $line;
  9. }
  10. }
  11.  
  12. return false;
  13. }
  14.  
  15. foreach($domains as $d) {
  16. echo creation_date($d) . "\n";
  17. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.