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

    Hi everyone

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

    Here is the PHP Code:

    
    <?php
     $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 10 years, 2 months ago by Fabrice.
    #212265

    Hi Fabrice!

    You can use this plugin: http://wordpress.org/plugins/shortcode-exec-php/ to embed any php code into you posts/pages.

    Best regards,
    Peter

    #212468

    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!

    Gruss
    Fabrice

    #212670

    Hey!

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

    Cheers!
    Peter

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Domain checker – input box’ is closed to new replies.