File uploading

2003-07-17 Thread Mike Harrison
Hello, I have a perl program that allows a user to upload a file (either .jpg or .gif) to the server, and returns a message if it exceeds a specified size (in my case 100kB). Currently (and don't laugh - I am new to perl), I go through the motions of uploading the file in 1024-byte blocks (in bi

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