Last active
August 29, 2015 14:08
-
-
Save baltpeter/600ae91f43b11904e559 to your computer and use it in GitHub Desktop.
Use freedomainapi.com to check whether a domain is available as both .de and .com
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 | |
function checkdomain($domain) { | |
$api_req = file_get_contents('http://freedomainapi.com/?key=YOURAPIKEY&domain=' . $domain); | |
$api_req = json_decode($api_req, true); | |
if($api_req['available'] == 'true') return true; | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment