Skip to content
Youths Forum Youths Forum Youths Forum

Tech Blogs & Programming Tutorials

Youths Forum Youths Forum Youths Forum

Tech Blogs & Programming Tutorials

  • Blog
  • News
  • Programming
    • PHP
    • JavaScript
    • JQuery
    • CSS
    • HTML
    • API
  • Stock Market Live
  • Automobiles
    • Cars
  • Gadgets
    • Phones
    • Android Phones

Categories

  • Artificial Intelligence (1)
  • Automobiles (12)
    • Cars (7)
  • Blog (104)
    • Poems (2)
    • Space (2)
  • Command (2)
  • Education (2)
  • Entertainment (4)
  • Gadgets (9)
    • Phones (8)
      • Android Phones (4)
  • HTML Templates (11)
  • IT Training Institutes (1)
  • Lifestyle (4)
  • News (56)
  • Others (23)
  • Programming (296)
    • API (16)
    • CSS (83)
    • Database (4)
    • Hosting (1)
    • HTML (37)
    • JavaScript (117)
      • JQuery (27)
      • ReactJS (7)
    • PHP (116)
  • Python (3)
  • recipes (1)
  • SEE Result (1)
  • Server (3)
  • Blog
  • News
  • Programming
    • PHP
    • JavaScript
    • JQuery
    • CSS
    • HTML
    • API
  • Stock Market Live
  • Automobiles
    • Cars
  • Gadgets
    • Phones
    • Android Phones
Close

Search

PHP

Domain Name Checker Tool using PHP

By Admin
February 8, 2023 3 Min Read
Comments Off on Domain Name Checker Tool using PHP

A domain name availability checker is a tool used to determine whether a desired domain name is available for registration. In today’s digital age, having an online presence is crucial for businesses and individuals alike. A domain name is the address of a website, and it plays a crucial role in establishing your brand online.

Before registering a domain name, it’s important to check its availability to ensure that it hasn’t already been taken. A domain name availability checker makes this process simple and easy. You simply enter the desired domain name, and the tool will check if it’s available for registration. If the domain name is taken, the checker will often provide suggestions for similar, available names.

Using a domain name availability checker has several benefits. First and foremost, it saves time and effort. By checking the availability of a domain name before registering it, you can avoid the frustration of finding out that the name you wanted has already been taken. Additionally, it helps you avoid the risk of infringing on someone else’s trademark.

Another benefit of using a domain name availability checker is that it allows you to reserve your desired domain name as soon as it becomes available. Many checkers offer a “backorder” service, which means that they will automatically register the domain name on your behalf as soon as it becomes available. This is particularly useful for businesses and individuals who want to secure a specific domain name for their brand.

In conclusion, a domain name availability checker is an essential tool for anyone who wants to establish an online presence. Whether you’re a business looking to establish your brand or an individual seeking a personal website, a domain name availability checker can help you secure the domain name you want. With its many benefits, including saving time, avoiding trademark infringement, and reserving your desired domain name, it’s a must-have tool for anyone looking to build a website.

Follow this video for complete guidance :

https://www.youtube.com/watch?v=SYAh-SRIkyM

Domain Name Checker Tool using PHP

We need to create two files for this :

1. index.php

2. search.php

1. index.php

<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
      body{
        width:100%;
        position: relative;
        height:100vh;
        overflow: hidden;
      }
      .page-inner{
        text-align: center;
        position: absolute;
        top:40%;
        left: 50%;
        transform: translate(-50%,-50%);
      }
      .searchbar{
        width: 400px;
        max-width: 100%;
        border: none;
        margin-top: 1px;
        margin-right: 8px;
        font-size: 1em;
        border-bottom: #333 solid 2px;
        transition: 0.3s;
        padding: 12px 5px;
        background-color: transparent;
      }
      .searchbar:focus {
        outline: none;
      }
      .response{
        margin-top:20px;
      }
      .response span{
        padding:10px;
        color:#fff;
      }
      .success{
        background-color: #63a463;
      }
      .danger{
        background-color: #d77373;
      }
    </style>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
    </head>
  <body>
    <div class="page-inner">
      <h2>Check Domain Name Availability</h2>
      <input class="searchbar" type="text" name="domain" placeholder="google.com">
      <div class="response">Enter the domain and press enter to check</div>
    </div>

    <script type="text/javascript">

    $('.searchbar').on('keypress',function(e) {
        if(e.which == 13) {
            search();
        }
    });

      function search(){
        $(".response").html('Checking ...');
        domain = $('.searchbar').val();
        $.ajax({
          url:'search.php?domain='+domain,
          type:'get',
          success:function(res){
            $(".response").html(res);
          }
        });
      }
    </script>
  </body>
</html> 

 

2. search.php

<?php

$domain = (isset($_GET['domain']))?$_GET['domain']:false;
if (strpos($domain, ".com") !== false) {

}else{
    $domain .= '.com';
}

if($domain){
    $output = shell_exec("whois $domain");
    if (strpos($output, "No match for") !== false) {
        echo '<span class="success">'.$domain.' is available for purchase</span>';
    } else {
        echo '<span class="danger">'.$domain.' is not available for purchase</span>';
    }
}

 

 

 

Author

Admin

Follow Me
Other Articles
Previous

What does ChatGPT says about itself ?

Next

How to create a Python script to automate repetitive tasks ?

FIFA World Cup 2026 Predict and Win by SportsGuff

Recent Posts

  • Over 10,000 Nepali Students to Join First-Ever National Innovation League
  • AI Journalism Workshop Held in Kathmandu by CAN Federation and TBAN
  • ChatGPT vs Gemini vs Claude AI: 7 Crucial Differences Revealed
  • CAN Federation Partners with FEJA to Host Exclusive ‘AI in Journalism’ Workshop
  • Shramik Shanti Campus Hosts Workshop on AI in Cybersecurity and Sovereign AI

Tags

adsense ai animate animation animation using HTML and CSS API blog calculator chatgpt Cryptocurrency CSS css animation design Email Facebook featured filemanager file manager free template google htaccess HTML image Instagram interview javascript JQuery jquery ui NADA AutoShow NADA Auto Show 2024 password PHP Progressive Web App PWA QR random react reactjs Rotate travel Twitter vpn youthforum youthsforum youtube

About Us

At Youths Forum, we are passionate about sharing knowledge that empowers students, educators, professionals, and technology enthusiasts.

Our Mission

Our mission is simple: to make technology and education accessible, understandable, and beneficial for everyone. We strive to create content that helps our readers learn new skills and stay updated with industry developments.

RSS RSS

  • Over 10,000 Nepali Students to Join First-Ever National Innovation League Admin
  • AI Journalism Workshop Held in Kathmandu by CAN Federation and TBAN Admin
  • ChatGPT vs Gemini vs Claude AI: 7 Crucial Differences Revealed Admin

Quick Links

  • Stock Market Live
  • Parliament Election 2082
Copyright 2026 — Youths Forum. All rights reserved. Blogsy WordPress Theme