Skip to content

Instantly share code, notes, and snippets.

@baltpeter baltpeter/checkdomain.php
Last active Aug 29, 2015

Embed
What would you like to do?
Use freedomainapi.com to check whether a domain is available as both .de and .com
<?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
You can’t perform that action at this time.