247hosting.co.nz Posted July 26, 2008 Share Posted July 26, 2008 I had someone give me a call, because our system was allowing them to search for funny domain names lilke: -one.com -two.com Notice the - at the front of the domain. Any way round this? 0 Quote Link to comment Share on other sites More sharing options...
joe123 Posted July 27, 2008 Share Posted July 27, 2008 well ,they get a "not valid" error if they do that . what else do u want to do ? they can type anything they want there 0 Quote Link to comment Share on other sites More sharing options...
arhost Posted July 29, 2008 Share Posted July 29, 2008 I had someone give me a call, because our system was allowing them to search for funny domain names lilke: -one.com -two.com Notice the - at the front of the domain. Any way round this? I can also confirm this. Try the WHMCS demo, below, it’s allowing dash e.g –one , as a domain name. http://demo.whmcs.com/cart.php?a=add&pid=2 0 Quote Link to comment Share on other sites More sharing options...
joe123 Posted July 31, 2008 Share Posted July 31, 2008 and how i thought i was getting "invalid domain" ? , now i see you are correct . well a simple javascript can prevent that . 0 Quote Link to comment Share on other sites More sharing options...
247hosting.co.nz Posted July 31, 2008 Author Share Posted July 31, 2008 Can this please be sorted or a workaround made - might be a good idea to have it build into the next release please. 0 Quote Link to comment Share on other sites More sharing options...
joe123 Posted July 31, 2008 Share Posted July 31, 2008 Can this please be sorted or a workaround made - might be a good idea to have it build into the next release please. after i have seen i was wrong yesterday , i wrote one , tell me if you find anything wrong with it . if everything is ok , i will give it to you till whmcs do something about it. http://www.hosting777.com/clients/domainchecker.php and dont worry about the message there , it will popup when there are illegal characters in the domain as well 0 Quote Link to comment Share on other sites More sharing options...
247hosting.co.nz Posted August 2, 2008 Author Share Posted August 2, 2008 Congratulations! -one.com is available Did you change the code? 0 Quote Link to comment Share on other sites More sharing options...
joe123 Posted August 3, 2008 Share Posted August 3, 2008 Congratulations! -one.com is available Did you change the code? yes i did , but i sent you the code that u can try it on your website ! 0 Quote Link to comment Share on other sites More sharing options...
brianoz Posted August 4, 2008 Share Posted August 4, 2008 When I first read this, I wondered whether -one.com was a valid domain name. It isn't, so we're correct in discussing this. Just thought I'd post in case anyone else was wondering the same thing ... "The only valid characters for a domain name are letters, numbers and a hyphen "-". Hyphens may be anywhere in the middle of a name, but can not be located at the end or beginning of a name. A valid domain name does not have spaces. A domain name can be up to 67 characters long -- including the 4 characters used to identify the Top Level Domain (.com, net, .org). Do not type the www. or your ext. before your domain name when registering as it is automatically inserted." Also the RFC says a domain name has to start with a letter, but I'm pretty sure modern domains can start with a number (they definitely can in the .au namespace). 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted August 4, 2008 Share Posted August 4, 2008 Also the RFC says a domain name has to start with a letter, but I'm pretty sure modern domains can start with a number (they definitely can in the .au namespace). That RFC revision is wrong. It *used* to be that domains had to *contain* a letter, but IISTR even thats been dropped for most TLDs now. 0 Quote Link to comment Share on other sites More sharing options...
joe123 Posted August 5, 2008 Share Posted August 5, 2008 according to what you say , i think the following code will make all the validations needed (domainchecker.tpl) any corrections or modifications to the code are welcome . {literal} <script type="text/javascript"> function validate(){ validField = /^[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]$/; domainStr = document.forms.checkdomain.domain.value; if (validField.test(domainStr) == false) { alert("INVALID DOMAIN \nDomain Name must start and end with a letter or a number \nDomain should not Include illegal characters or empty spaces"); return false; } } </script> {/literal} and your form action should look like this : <form name=checkdomain method="post" action="domainchecker.php" onSubmit="return validate()"> 0 Quote Link to comment Share on other sites More sharing options...
Amcom Posted September 7, 2008 Share Posted September 7, 2008 All I did was to just add some verbiage to the pop-up statement in the above code. Thanks joe123 for the code. {literal} <script type="text/javascript"> function validate(){ validField = /^[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]$/; domainStr = document.forms.checkdomain.domain.value; if (validField.test(domainStr) == false) { alert("INVALID DOMAIN \nDomain Name must start and end with a letter or a number. \nDomain should not Include illegal characters or empty spaces Your search on The Domain produced the following error:\n\nThe Rules: \n* Unless the Top Level Domain you are using requires or supports a Second Level Domain for classification (the \"co\" in .co.uk), you should not enter anything but a domain name and a Top Level Domain. \n* Don't put \"www.\" in front of the domain. \"www.\" is a host name, not a domain name. You should not use \"www\" anywhere unless it part of the actual domain name you are looking for. \n* Legal characters are 0-9, a-z and the dash sign ( - ) or the Underscores ( _ ) ?.? Spaces are not permitted in domains. \n\nA list of errors and their meanings follows: \n\n* Domain name too long/short This means that the domain name that you entered was either too long or too short, legal sdomain name lengths are between 2 characters and 57 characters. \n\n* Domain name cannot contain any letters of hyphens in 2 character domain names This error message is returned if your domain name was only 2 characters long and it contained either a hyphen or a letter, this is because 2 character domain names are only allowed to contain numbers. \n\n* Domain names cannot begin or end in a hyphen or contain double hyphens A domain name can contain hyphens, however the hyphens cannot be neighbours (ie \"--\") and they also cannot begin the domain name or end it, ie \"-abchois.xxx\" is illegal as it begins with a hyphen. \n\n* Domain names must only contain alphanumerical characters and hyphens Domain names must only consist of numbers, letter and hyphens - this means that no spaces, periods, commas or any other kind of punctuation is allowed. This is common when people begin the domain name with \"www.\" - this is not part of the domain name and should not be used. \n\n* Cannot connect to [server name] If you recieve this message then the whois server that I am trying to connect to in order to perform your query is either refusing my network connection or for some other reason I am unable to connect to it, the best course of action when this occurs is to simply try again later. \n\n* No top level domain selected This means that you failed to select a top level domain for your domain name, for example `co.uk', `com', `net' etc. \n\n* Top level domain not supported This error message means that whichever top level domain extension you chose is not supported by this scripts configuration, in other words, I do not have the information required to search for this top level domain."); return false; } } </script> {/literal} <form name=checkdomain method="post" action="domainchecker.php" onSubmit="return validate()"> 0 Quote Link to comment Share on other sites More sharing options...
Serverweb Posted June 18, 2009 Share Posted June 18, 2009 Hi i've a problem. How can i limit 3 words about domain search? example i search cc.it i can't register thanks regards 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.