🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: de.comp.lang.php
Article #22

Validate Domain Name

#22
From: Jose Luis Rodr�guez Sevilla
Date: Fri, 30 Jun 2000 00:00
18 lines
1218 bytes
How i can to validate a domain name that only must contain this characters
"abcdefghijkmnpqrstuvwxyz2345678910ABCDEFGHIJKLMNOPQRSTUVWXYZ.-" ?

I tried this but it doesn't work.

 if
(ereg('[^abcdefghijkmnpqrstuvwxyz2345678910ABCDEFGHIJKLMNOPQRSTUVWXYZ.-]',
$domain)){
  $ok = "False";
 }

 if (eregi('[^-.a-z0-9A-Z]', $domain)){
  $ok = "False";
 }

Help me, please.

Thank You. Jose Luis
Technical Details
Message-ID: <8jhse0$p0o$1@talia.mad.ttd.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10f92b,4026a23bcd365605,start
X-Google-Attributes: gid10f92b,public
X-Google-Thread: 1148a8,4026a23bcd365605,start
X-Google-Attributes: gid1148a8,public
X-Google-Thread: 10ce1c,4026a23bcd365605,start
X-Google-Attributes: gid10ce1c,public
X-Google-Thread: 10b1d3,4026a23bcd365605,start
X-Google-Attributes: gid10b1d3,public
From: "Jose Luis Rodr�guez Sevilla" <joseluis@REMOVEMEferca.com>
Subject: Validate Domain Name
Date: 2000/06/30
Message-ID: <8jhse0$p0o$1@talia.mad.ttd.net>
X-Deja-AN: 640755537
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Organization: Telefonica Transmision de Datos
X-MSMail-Priority: Normal
Newsgroups: de.comp.lang.php,ba.php,fr.comp.infosystemes.www.auteurs.php,ufra.lists.php