Posted By

xavsio4 on 04/07/11


Tagged


Versions (?)

Basic PHP WHOIS


 / Published in: PHP
 

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

Report this snippet  

You need to login to post a comment.