Skip to content

Instantly share code, notes, and snippets.

Created September 3, 2016 12:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/39ad53b4c8574d78b09b2d22f4f53572 to your computer and use it in GitHub Desktop.
Save anonymous/39ad53b4c8574d78b09b2d22f4f53572 to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head><title>Search Availability of Domain...</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
<style>
#custom-search-input{
padding: 3px;
border: solid 1px #E4E4E4;
border-radius: 6px;
background-color: #fff;
}
#custom-search-input input{
border: 0;
box-shadow: none;
}
#custom-search-input button{
margin: 2px 0 0 0;
background: none;
box-shadow: none;
border: 0;
color: #666666;
padding: 0 8px 0 10px;
border-left: solid 1px #ccc;
}
#custom-search-input button:hover{
border: 0;
box-shadow: none;
border-left: solid 1px #ccc;
}
#custom-search-input .glyphicon-search{
font-size: 23px;
}
h1{
color:red;
}
h2{
color:green;
}
</style>
<body>
<div class="container">
<div class="row">
<div class="col-md-6">
<h3>Search Domain Availability</h3>
<form action="" method="GET">
<div id="custom-search-input">
<div class="input-group col-md-24" >
<input type="text" name="domain" class="form-control input-lg" placeholder="Enter Domain and hit Enter" />
<span class="input-group-btn">
<span class="glyphicon glyphicon-search"></span>
</span>
</div>
</div>
</form>
<?php
error_reporting(0);
if(isset($_GET['domain'])){
$domain = $_GET['domain'];
$godaddy = 'https://in.godaddy.com/domains/searchresults.aspx?checkAvail=1&tmskey=&domainToCheck='.$domain.'';
$namecom = 'https://www.name.com/domain/search/'.$domain.'';
$registercom = 'http://www.register.com/domain/search/wizard.rcmx?searchDomainName='.$domain.'&searchPath=Default&searchTlds=';
if ( gethostbyname($domain) != $domain ) {
echo "<h1>Already Registered!</h1>";
}
else {
echo "<h3>$domain</h3><h2><br>Not Taken, you can register it.<br>We prefer godaddy<br><a target='_BLANK' href='".$godaddy."'>Register on Godaddy</a><br>
<a target='_BLANK' href='".$namecom."'>Register on Name.com</a><br><a target='_BLANK' href='".$registercom."'>Register on Register.com</a>
</h2>";
}
}
?>
</div>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment