[PHP] Re: Help: Validate Domain Name by Regular Express
On 01/08/2011 04:55 PM, WalkinRaven wrote: PHP 5.3 PCRE Regular Express to match domain names format according to RFC 1034 - DOMAIN NAMES - CONCEPTS AND FACILITIES /^ ( [a-z] | [a-z] (?:[a-z]|[0-9]) | [a-z] (?:[a-z]|[0-9]|\-){1,61} (?:[a-z]|[0-9]) ) # One label (?:\.(?1))*+ # More labels \.? # Root domain name $/iDx This rule matches only label and label. but not label.label... I don't know what wrong with it. Thank you. Thank you all, and I think I've found the problem: If you don't use 'Recursive Reference' feature, all will work well. Detail: http://ndss.walkinraven.name/2011/01/bug-related-to-recursive-reference-in.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
tedd wrote: At that time, I registered almost 30 names. Fortunately, all of my names passed and I was permitted to keep them. Unfortunately, all browser manufactures (except Safari) negated some of the work done by the IDNS WG and as a result PUNYCODE is shown instead of the actual characters intended. Only for characters that are not part of a national alphabet, I believe? This one works fine: http://rugbrød.ch/ Besides, many domain registrars also limit the available characters to those that are part of a national alphabet. -- Per Jessen, Zürich (0.0°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Help: Validate Domain Name by Regular Express
Hello Ashley Sheridan, Am 2011-01-08 17:09:27, hacktest Du folgendes herunter: Also, each label is checked to ensure it doesn't run over 63 characters, and the whole thing isn't over 253 characters. Lastly, each label is checked to ensure it doesn't completely consist of digits. Do you know, that there are MANY domains with numbers only? Like 163.com or 126.net which are legal names. Oh I should mention that I block ANY mails from this two domains since chinese spamers use it excessively. Thanks, Greetings and nice Day/Evening Michelle Konzack -- # Debian GNU/Linux Consultant ## Development of Intranet and Embedded Systems with Debian GNU/Linux itsyst...@tdnet France EURL itsyst...@tdnet UG (limited liability) Owner Michelle KonzackOwner Michelle Konzack Apt. 917 (homeoffice) 50, rue de Soultz Kinzigstraße 17 67100 Strasbourg/France 77694 Kehl/Germany Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil Tel: +33-9-52705884 fix http://www.itsystems.tamay-dogan.net/ http://www.flexray4linux.org/ http://www.debian.tamay-dogan.net/ http://www.can4linux.org/ Jabber linux4miche...@jabber.ccc.de ICQ#328449886 Linux-User #280138 with the Linux Counter, http://counter.li.org/ signature.pgp Description: Digital signature
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
At 11:54 AM +0100 1/11/11, Per Jessen wrote: tedd wrote: At that time, I registered almost 30 names. Fortunately, all of my names passed and I was permitted to keep them. Unfortunately, all browser manufactures (except Safari) negated some of the work done by the IDNS WG and as a result PUNYCODE is shown instead of the actual characters intended. Only for characters that are not part of a national alphabet, I believe? This one works fine: http://rugbrød.ch/ Not for me. It translates to: xn--rugbrd-fya.ch Besides, many domain registrars also limit the available characters to those that are part of a national alphabet. -- Per Jessen, Zürich (0.0°C) National alphabet? Never heard of it -- what Nation? Are the Greek letters Sigma, Delta, Pi part of this National alphabet? While they are common in our English language, I don't think they are not included. In addition, many registrars are clueless about IDNS, Char Sets, and what is legal and not. Plus, the are many differences between different TLD registrars. For example, the TLD COM can have single characters whereas the ORG will not allow single characters regardless of language (including ASCII). The IDNS is still in a state of flux. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
tedd wrote: At 11:54 AM +0100 1/11/11, Per Jessen wrote: tedd wrote: At that time, I registered almost 30 names. Fortunately, all of my names passed and I was permitted to keep them. Unfortunately, all browser manufactures (except Safari) negated some of the work done by the IDNS WG and as a result PUNYCODE is shown instead of the actual characters intended. Only for characters that are not part of a national alphabet, I believe? This one works fine: http://rugbrød.ch/ Not for me. It translates to: xn--rugbrd-fya.ch Probably a browser issue. The above works fine with e.g. FF3.6 amd Konqueror 3.5. Besides, many domain registrars also limit the available characters to those that are part of a national alphabet. National alphabet? Never heard of it -- what Nation? Perhaps not the correct expression, but most non-English languages have their own alphabets, and despite some countries sharing a language, what they allow for domain name registration isn't always the same (ref. Michelle Konzacks earlier posting). For instance, while 'ï' is used in Dutch, English, and French (I believe), it is not used in Danish, so it is not allowed in Danish domain names. Here is the list of characters accepted by the German registrar: http://www.denic.de/de/domains/internationalized-domain-names/idn-liste.html The Swiss registrar: https://www.nic.ch/reg/wcmPage.action?res=/reg/guest/faqs/idn.jspplainlid=de Austrian registrar: http://www.nic.at/fileadmin/www.nic.at/documents/idn/idn_at_tld_de.txt Danish registrar: https://www.dk-hostmaster.dk/selvbetjening/koeb-dk-domaenenavn/tegnsaet-for-domaenenavne/ (quite limited: a-z, 0-9, hyphen, æ, ø, å, ö, ä, ü, é) Are the Greek letters Sigma, Delta, Pi part of this National alphabet? No, only the Greek alphabet which probably is used in Greece and Cyprus only. In addition, many registrars are clueless about IDNS, Char Sets, and what is legal and not. Not in my experience. The various national/European registrars usually have very strict regulations, and any domain registrar offering his or her services to the public had better understand them. -- Per Jessen, Zürich (0.0°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
Michelle Konzack wrote: Hello Ashley Sheridan, Am 2011-01-08 17:09:27, hacktest Du folgendes herunter: Also, each label is checked to ensure it doesn't run over 63 characters, and the whole thing isn't over 253 characters. Lastly, each label is checked to ensure it doesn't completely consist of digits. Do you know, that there are MANY domains with numbers only? Here is a list of 197 such Swiss domains: http://public.jessen.ch/files/ch-domains-only-numeric.txt -- Per Jessen, Zürich (0.0°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
On Tue, 2011-01-11 at 19:00 +, Ashley Sheridan wrote: On Tue, 2011-01-11 at 17:07 +0100, Michelle Konzack wrote: Hello Ashley Sheridan, Am 2011-01-08 17:09:27, hacktest Du folgendes herunter: Also, each label is checked to ensure it doesn't run over 63 characters, and the whole thing isn't over 253 characters. Lastly, each label is checked to ensure it doesn't completely consist of digits. Do you know, that there are MANY domains with numbers only? Like 163.com or 126.net which are legal names. Oh I should mention that I block ANY mails from this two domains since chinese spamers use it excessively. Thanks, Greetings and nice Day/Evening Michelle Konzack I just based the code on the spec. Thanks, Ash http://www.ashleysheridan.co.uk my old (still kinda active but not really) business was/is called 990WEBS, and my URL is www.990webs.ca / www.990webs.com is the url with preceeding numerals an issue? or is this only numerals only? it also is my business number :P 990-9327 (WEBS) TheStapler.ca is also my domain... which is a my nickname (last name is staples) ANYWAY... way off topic there, was just wodnering about the legality of my 990webs domains... since i can't think of any other domains that start with numbers off the top of my head? -- Steve Staples Web Application Developer 519.258.2333 x8414 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
On Tue, 2011-01-11 at 14:44 -0500, Steve Staples wrote: On Tue, 2011-01-11 at 19:00 +, Ashley Sheridan wrote: On Tue, 2011-01-11 at 17:07 +0100, Michelle Konzack wrote: Hello Ashley Sheridan, Am 2011-01-08 17:09:27, hacktest Du folgendes herunter: Also, each label is checked to ensure it doesn't run over 63 characters, and the whole thing isn't over 253 characters. Lastly, each label is checked to ensure it doesn't completely consist of digits. Do you know, that there are MANY domains with numbers only? Like 163.com or 126.net which are legal names. Oh I should mention that I block ANY mails from this two domains since chinese spamers use it excessively. Thanks, Greetings and nice Day/Evening Michelle Konzack I just based the code on the spec. Thanks, Ash http://www.ashleysheridan.co.uk my old (still kinda active but not really) business was/is called 990WEBS, and my URL is www.990webs.ca / www.990webs.com is the url with preceeding numerals an issue? or is this only numerals only? it also is my business number :P 990-9327 (WEBS) TheStapler.ca is also my domain... which is a my nickname (last name is staples) ANYWAY... way off topic there, was just wodnering about the legality of my 990webs domains... since i can't think of any other domains that start with numbers off the top of my head? -- Steve Staples Web Application Developer 519.258.2333 x8414 Ah, it was my mistake, I misread the spec. It's only the TLD that must not be completely numeric, so that check can be taken out of the code I gave earlier. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
At 12:23 PM -0500 1/9/11, Daniel Brown wrote: On Sun, Jan 9, 2011 at 11:58, tedd tedd.sperl...@gmail.com wrote: For example -- http://xn--19g.com -- is square-root dot com. In all browsers except Safari, PUNYCODE is shown in the address bar, but in Safari it's shown as .com Not sure if that's a typo or an issue in translation while the email was being relayed through the tubes, but .com directs to xn--wqa.com here. -- /Daniel P. Brown Daniel et al: Translation of Unicode characters by various software programs is unpredictable -- this includes email applications. While I can send/receive (square root) through my email program (Eudora) what your email program displays to you can be (as shown) something completely different. The mapping of the code-points (i.e., square-root) to what your program displays (much like a web site) depends upon how your email program works. If your email program has the correct Char Set and will map it to the what was actually received, then the character will be displayed correctly. If not, then things like .com happen. Unfortunately, this mapping problem has not been of great importance for most applications. As it is now, most applications work for English speaking people and that seems good enough, or so many manufactures think. However, as the rest of the world starts using applications (and logging on to the net) it will obviously become more advantageous for manufactures to make their software work correctly for other-than-English languages. Apple is doing that and last year the majority of their income came from overseas (i.e., other than USA). The mapping of other than English characters was the problem addressed by the IDNS WG, where I added my minor contribution circa 2000. Unfortunately, homographic issues were not resolved by the WG. However, a solution was proposed (I entitled as the Fruit-loop solution) which was to color-code (flag) the characters in the address bar of a browser IF the URL contained a mixed Char Set. Unfortunately, that solution was not pursued and instead Browser manufactures choose to show raw PUNYCODE, which was never intended to be seen by the end users. A giant step backwards IMO. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
At 11:41 AM -0600 1/9/11, Donovan Brooke wrote: Daniel Brown wrote: On Sun, Jan 9, 2011 at 11:58, teddtedd.sperl...@gmail.com wrote: For example -- http://xn--19g.com -- is square-root dot com. In all browsers except Safari... but yes, the actual square root character appears in safari only. Interesting! Donovan Donovan: Yes, Safari shows ALL Unicode Code-Points (i.e., Characters) as they were intended. Here's a couple of examples: http://xn--u2g.com http://xn--w4h.com Interesting enough, the above characters cannot be typed directly from a key-board, but are shown correctly by a Browser. However as I said, these can only be seen correctly by the Safari browser. If you use IE, then the URL's will be shown as PUNYCODE -- M$ has a better idea. What I also find interesting is that there are no restrictions for using IDNS names in email addresses. However, even Apple's Mail program restricts these to standard ASCII. IOW, an email address of t...@.com is perfectly legal (and will work), but no email application will allow it. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
On Mon, 2011-01-10 at 11:39 -0500, tedd wrote: At 11:41 AM -0600 1/9/11, Donovan Brooke wrote: Daniel Brown wrote: On Sun, Jan 9, 2011 at 11:58, teddtedd.sperl...@gmail.com wrote: For example -- http://xn--19g.com -- is square-root dot com. In all browsers except Safari... but yes, the actual square root character appears in safari only. Interesting! Donovan Donovan: Yes, Safari shows ALL Unicode Code-Points (i.e., Characters) as they were intended. Here's a couple of examples: http://xn--u2g.com http://xn--w4h.com Interesting enough, the above characters cannot be typed directly from a key-board, but are shown correctly by a Browser. However as I said, these can only be seen correctly by the Safari browser. If you use IE, then the URL's will be shown as PUNYCODE -- M$ has a better idea. What I also find interesting is that there are no restrictions for using IDNS names in email addresses. However, even Apple's Mail program restricts these to standard ASCII. IOW, an email address of t...@.com is perfectly legal (and will work), but no email application will allow it. Cheers, tedd -- --- http://sperling.com/ on my Ubuntu box, I can copy and past the √ (square-root) character and it displays properly in he address bar on google chome, but it translates it back to the http://xn--19g.com and doesn't show anything else (well... the page loads...LOL) so did you register the xn--19q.com address knowing that it would work/translate to √.com (square-root) ? -- Steve Staples Web Application Developer 519.258.2333 x8414 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
At 11:57 AM -0500 1/10/11, Steve Staples wrote: On Mon, 2011-01-10 at 11:39 -0500, tedd wrote: For example -- http://xn--19g.com -- is square-root dot com. on my Ubuntu box, I can copy and past the (square-root) character and it displays properly in he address bar on google chome, but it translates it back to the http://xn--19g.com and doesn't show anything else (well... the page loads...LOL) so did you register the xn--19q.com address knowing that it would work/translate to .com (square-root) ? -- Steve Staples Steve: When I was associated with the IDNS WG (not a member), there came a time where the powers that be wanted to try out their solutions, namely PUNYCODE. As such, we were allowed to register IDNS domain names on a trial basis. The conditions of the trial were that we could register any IDNS we wanted (at $100 a pop) and if at anytime over the following year our names caused problems, then we would forfeit our names without compensation. In short, a $100 per-name bet! At that time, I registered almost 30 names. Fortunately, all of my names passed and I was permitted to keep them. Unfortunately, all browser manufactures (except Safari) negated some of the work done by the IDNS WG and as a result PUNYCODE is shown instead of the actual characters intended. I continue to hold on to my domain names because I believe that the PUNYCODE problem will be resolved someday and my single character domain names will be valuable. Please realize that single character ASCII characters are estimated to sell for over a million dollars each -- you may want to review this: http://www.cbsnews.com/stories/2005/11/28/tech/main1080245.shtml In any event, this is out of the main stream of PHP. However, it should just be noted that Unicode characters, which started this thread, are very involved and many software manufactures are not implementing solutions correctly. In contrast, the PHP community has provided numerous Multibyte String Functions (mb_) for dealing with Unicode. So, our PHP applications can correctly deal with what Unicode provides that are far exceed simple ASCII. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
Tamara Temple wrote: On Jan 8, 2011, at 2:22 PM, Al wrote: On 1/8/2011 3:55 AM, WalkinRaven wrote: PHP 5.3 PCRE Regular Express to match domain names format according to RFC 1034 - DOMAIN NAMES - CONCEPTS AND FACILITIES /^ ( [a-z] | [a-z] (?:[a-z]|[0-9]) | [a-z] (?:[a-z]|[0-9]|\-){1,61} (?:[a-z]|[0-9]) ) # One label (?:\.(?1))*+ # More labels \.? # Root domain name $/iDx This rule matches only label and label. but not label.label... I don't know what wrong with it. Thank you. Look at filter_var() Validates value as URL (according to » http://www.faqs.org/rfcs/rfc2396) , I'm wondering what mods to make for this now that unicode chars are allowed in domain names You're talking about IDNs ? The actual domain name is still US-ASCII, only when you decode punycode do you get UTF8 characters. -- Per Jessen, Zürich (10.1°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
At 12:15 PM +0100 1/9/11, Per Jessen wrote: Tamara Temple wrote: I'm wondering what mods to make for this now that unicode chars are allowed in domain names You're talking about IDNs ? The actual domain name is still US-ASCII, only when you decode punycode do you get UTF8 characters. Per Jessen, Zürich (10.1°C) Unfortunately, you are correct. It was never the intention of the IDNS WG for the end-user to see PUNYCODE, but rather that all IDNS be seen by the end-user as actual Unicode code points (Unicode characters). The only browser that currently supports this is Safari. For example -- http://xn--19g.com -- is square-root dot com. In all browsers except Safari, PUNYCODE is shown in the address bar, but in Safari it's shown as .com The IDNS works, but for fear of homographic attacks IE (and other browsers) will not show the IDNS correctly. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
On Sun, Jan 9, 2011 at 11:58, tedd tedd.sperl...@gmail.com wrote: For example -- http://xn--19g.com -- is square-root dot com. In all browsers except Safari, PUNYCODE is shown in the address bar, but in Safari it's shown as ˆ.com Not sure if that's a typo or an issue in translation while the email was being relayed through the tubes, but ˆ.com directs to xn--wqa.com here. -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
On Sun, Jan 9, 2011 at 12:32, Ashley Sheridan a...@ashleysheridan.co.uk wrote: ^ is to the power of, not square root, which is √, which does translate to Tedds domain Thanks for the math lesson, professor, but I already knew that. ;-P My point is, and as you can see in the quoted text from my email, that I don't know if it was a typo on Tedd's part or what, but ^.com is what came through here. -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
Daniel Brown wrote: On Sun, Jan 9, 2011 at 11:58, teddtedd.sperl...@gmail.com wrote: For example -- http://xn--19g.com -- is square-root dot com. In all browsers except Safari, PUNYCODE is shown in the address bar, but in Safari it's shown as ˆ.com Not sure if that's a typo or an issue in translation while the email was being relayed through the tubes, but ˆ.com directs to xn--wqa.com here. error in translation. I get the same domain for: seamonkey firefox googlechrome safari but yes, the actual square root character appears in safari only. Interesting! Donovan -- D Brooke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
On Sun, 2011-01-09 at 12:23 -0500, Daniel Brown wrote: On Sun, Jan 9, 2011 at 11:58, tedd tedd.sperl...@gmail.com wrote: For example -- http://xn--19g.com -- is square-root dot com. In all browsers except Safari, PUNYCODE is shown in the address bar, but in Safari it's shown as ˆ.com Not sure if that's a typo or an issue in translation while the email was being relayed through the tubes, but ˆ.com directs to xn--wqa.com here. -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ ^ is to the power of, not square root, which is √, which does translate to Tedds domain Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
On Sun, 2011-01-09 at 12:38 -0500, Daniel Brown wrote: On Sun, Jan 9, 2011 at 12:32, Ashley Sheridan a...@ashleysheridan.co.uk wrote: ^ is to the power of, not square root, which is √, which does translate to Tedds domain Thanks for the math lesson, professor, but I already knew that. ;-P My point is, and as you can see in the quoted text from my email, that I don't know if it was a typo on Tedd's part or what, but ^.com is what came through here. -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ Sorry, lol! It came through as an unrecognised character for me, maybe some email issue then? Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] Re: Help: Validate Domain Name by Regular Express
On 1/8/2011 3:55 AM, WalkinRaven wrote: PHP 5.3 PCRE Regular Express to match domain names format according to RFC 1034 - DOMAIN NAMES - CONCEPTS AND FACILITIES /^ ( [a-z] | [a-z] (?:[a-z]|[0-9]) | [a-z] (?:[a-z]|[0-9]|\-){1,61} (?:[a-z]|[0-9]) ) # One label (?:\.(?1))*+ # More labels \.? # Root domain name $/iDx This rule matches only label and label. but not label.label... I don't know what wrong with it. Thank you. Look at filter_var() Validates value as URL (according to » http://www.faqs.org/rfcs/rfc2396), -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php