Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #211899

    Hi everyone

    I want implement a domain-checker, which check if a domain is available – or not.

    Here is the PHP Code:

     $domain = $_POST["dns"]';
     if ( gethostbyname($domain) != $domain ) {
      echo "Domain is not available";
     else {
      echo "Domain is available";

    It should have a input box (post-value “dns” for the php code) on my main page in which the customer can check a domain name.
    How can I implement this PHP code and the input box/submit button on my page?

    Thanks for help!

    • This topic was modified 3 years, 10 months ago by  Fabrice.

    Hi Fabrice!

    You can use this plugin: to embed any php code into you posts/pages.

    Best regards,


    Hey Dude

    Works perfect! Much thanks!

    Okay, I what’s my aim
    The customer check a domain. If the domain is available he should can order it (i have installed woocommerce).

    I don’t know if this forum can help me but I will try:

    – How can I add a required input field (for the domain-name) on the product in woocommerce?
    – Can I pass the parameter from the domain checker to this input field?

    Thanks for help!




    We can’t help you with this request because it’s not theme related and a customization. Please hire a freelancer (i.e. here: or here: ) who can customize the woocommerce plugin code for you.


Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Domain checker – input box’ is closed to new replies.