RE: Getting the domain name

2003-07-17 Thread Keith Szlamp
Ovid Says > To be honest, while I don't know a simple answer for this, the reality is that this answer doesn't work very well. People can easily type stuff like: http://blogs.server.somehost.co.uk/ http://foo.co.uk/ https://www.host.com/ Keith Says > Hmm... I agree with you. It's the same

RE: Getting the domain name

2003-07-17 Thread Ovid
--- Keith Szlamp <[EMAIL PROTECTED]> wrote: > my $domain = $ENV{'SERVER_NAME'}; > $domain =~ s/^http:\/\/www.//; > $domain =~ s/^http:\/\///; > > Regardless of what they enter, you should end up with just 'domain.tld' or > 'sub.domain.tld' if the name being forward using sub domains - like many >

RE: Getting the domain name

2003-07-17 Thread Keith Szlamp
> We have a fairly simple redirect script a url is entered, and even tho > there are directions to not enter the "http://www"; sometimes we get it > or "http://";... what is the simplest method to extract just the domain > name if a "http://www.somedomain_name.com"; or > "http://somedomain_name.com

Re: Getting the domain name

2003-07-14 Thread Wiggins d'Anconia
Mike Blezien wrote: Hello, We have a fairly simple redirect script a url is entered, and even tho there are directions to not enter the "http://www"; sometimes we get it or "http://";... what is the simplest method to extract just the domain name if a "http://www.somedomain_name.com"; or "http

Re: Getting the domain name

2003-07-14 Thread drieux
On Monday, Jul 14, 2003, at 09:37 US/Pacific, Mike Blezien wrote: Hello, We have a fairly simple redirect script a url is entered, and even tho there are directions to not enter the "http://www"; sometimes we get it or "http://";... what is the simplest method to extract just the domain name i

Getting the domain name

2003-07-14 Thread Mike Blezien
Hello, We have a fairly simple redirect script a url is entered, and even tho there are directions to not enter the "http://www"; sometimes we get it or "http://";... what is the simplest method to extract just the domain name if a "http://www.somedomain_name.com"; or "http://somedomain_name.co