We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30735
    • 18 Posts
    Hi

    I’m having problems with a domain checking script. The script works fine outside ModX, but not inside ModX.

    I was wondering if any of you smarties out there could edit the code to get it to work?

    Any help would be appreciated.

    echo '<form action="" method="post">
    <legend><tt>Specify the domain address to check.</tt></legend>
    <br>
    <input type="text" name="domain" value="www.example.com" size="50" maxlength="100">
    <br><br>
    <input type="submit" name="submit" value="Submit">';
    /*
    Changes by Juiced Lime Design 2006
    http://www.juicedlime.com
    */
    
    ini_set ('display_errors', 1);
    error_reporting (E_ALL & ~E_NOTICE);
    
    if (isset($_REQUEST['domain']))
    	{
    	if (isset($_POST['submit']))
    		{
    		if (gethostbyname($_POST['domain']) != $_POST['domain'])
    			{ // It exists
    			echo "<br><br><tt><b>" . $_POST['domain'] . ": The domain address exists.</b></tt>\n";
    			}
    			elseif (!(strlen($_POST['domain']) > 0))
    			{ // Text field empty
    			echo "<br><br><tt><b>No domain address specified.</b></tt>\n";
    			}
    			else
    			{ // It doesn't exist
    			header("Location: http:///www.tsone.info/index.php?domain=".$_POST['domain']."&id=25");
    			}
    		}
    	}
    
    echo'</form>';
    
    


    TSOne.info
      • 7455
      • 2,204 Posts
      you need to put all echo in a $ and then return $ at the end

      mm I have a snippet I made for etomite here. maybe you can use it?

      it needs some modification cause it hase links to a form that we use to order a domain.



        follow me on twitter: @dimmy01
        • 30735
        • 18 Posts
        Hi

        Thanks

        I don’t suppose theres a full english translation, it kinda loses me a bit with the german ( i think thats what it is anyways).

        TSOne.info
          • 37550 ☆ A M B ☆
          • 711 Posts
          onesmarthost Reply #4, 20 years ago
          Cool, another web hoster using Modx smiley Ive been working on porting my site to modx for a while now I think I have some domain name checking script somewhere and will try and dig it out for you,

          :)
            http://www.onesmarthost.co.uk
            UK MODX Hosting with love.
            • 37550 ☆ A M B ☆
            • 711 Posts
            onesmarthost Reply #5, 20 years ago
              http://www.onesmarthost.co.uk
              UK MODX Hosting with love.