Basic PHP WHOIS


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



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.