Created
May 9, 2014 11:23
-
-
Save do9iigane/f536dc1802902d5a8cc7 to your computer and use it in GitHub Desktop.
PHPでwhois情報のCreation Dateを取得します。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//whois取得 | |
$whois = file_get_contents('http://whoiz.herokuapp.com/lookup.json?url=interestic.com'); | |
preg_match('/(.*)Creation\ Date:(.*)/', json_decode($whois), $match); | |
$createdeDate = new DateTime($match[2]); | |
$this->set('createdDate', $createdeDate->format('Y')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment