Re: [PHP] parsing domains

2003-08-28 Thread David T-G
Mike -- ...and then CollegeSucks.com Mike said... % % Quick question... Quick answer :-) % ... % % $parseddomain = preg_replace('/.+?(\..+)/', '$1', $domain); # pulls out "domain" from # domain.com # www.domain.com # www.domain.ac.uk # ... $this_domain = preg_replace('/(

Re: Re[2]: [PHP] parsing domains

2003-08-28 Thread Mike J
> No it should just get rid of the www so your left > with domain.com and now that I see what you are > after it should have been: I don't aways use www.domain.com. Sometimes I use test.domain.com. I have about 14k of these pointing to the same script. Otherwise I would just remove the www -lo

Re[2]: [PHP] parsing domains

2003-08-28 Thread Tom Rogers
Hi, Thursday, August 28, 2003, 7:02:44 PM, you wrote: >> str_replace('/www.','/',$parseddomain); MJ> wont this just make me get a .com when I use my thing to parse the domain? MJ> -- MJ> ___ MJ> Get your free Verizonmail at www.verizonmail.com No i

Re: [PHP] parsing domains

2003-08-28 Thread Mike J
> So why does college suck? Afraid of learning? Feel free to ask me off the list and I'll explain why I started the site. Thanks for the code. Anyway way of making it one line and with the leading "."? J. -- ___ Get your free Verizonmail at www.veriz

Re: [PHP] parsing domains

2003-08-28 Thread John T. Beresford
So why does college suck? Afraid of learning? Anyway, you can solve your problem by simple parsing. An example is below. This will result in "edmondpaper.com" Obviously there are ways of refining this further, but if college sucks, you might not be interested in learning more :-). At 3:30 A

Re: [PHP] parsing domains

2003-08-28 Thread Mike J
> str_replace('/www.','/',$parseddomain); wont this just make me get a .com when I use my thing to parse the domain? -- ___ Get your free Verizonmail at www.verizonmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: htt

Re: [PHP] parsing domains

2003-08-28 Thread Tom Rogers
Hi, Thursday, August 28, 2003, 6:30:44 PM, you wrote: CcM> Quick question... CcM> I parse domains in my scripts like this to get the .domain.com out of www.domain.com. However, if someone visits my site with just domain.com in the url, I get .com back as the parsed domain. CcM> How can I make i

[PHP] parsing domains

2003-08-28 Thread CollegeSucks.com Mike
Quick question... I parse domains in my scripts like this to get the .domain.com out of www.domain.com. However, if someone visits my site with just domain.com in the url, I get .com back as the parsed domain. How can I make it so I aways get the .domain.com no matter what they use? Here is an