Re: [PHP] Getting domain out of a URL {SOLVED]

2007-01-17 Thread Andre Dubuc
On Wednesday 17 January 2007 06:16 pm, Jay Blanchard wrote: > [snip] > Why not use explode with the period (.) as the delimiter? > > $url = ranchy.stuff.com and other junk"; > $boom = explode(".", $url); > print_r($boom); > > $boom is now an array containing 'ranchy', 'stuff', 'com and other junk'

RE: [PHP] Getting domain out of a URL

2007-01-17 Thread Jay Blanchard
[snip] Something along the lines of: Part of my problem, I'm beginning to realize, is that the array '$boom[1]' contains only one element. Is there a similar string function I could use that would accomplish what I need? [/snip] Why not use explode with the period (.) as the delimiter? $url

Re: [PHP] Getting domain out of a URL

2007-01-17 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-17 17:53:09 -0500: > On Wednesday 17 January 2007 03:35 pm, Jay Blanchard wrote: > > [snip] > > I receive posts from an open moderated forum that need to be filtered > > for urls. I've successfully managed to trap any entires that use > > 'http://' 'www.' with the stan

Re: [PHP] Getting domain out of a URL

2007-01-17 Thread Andre Dubuc
On Wednesday 17 January 2007 03:35 pm, Jay Blanchard wrote: > [snip] > I receive posts from an open moderated forum that need to be filtered > for > urls. I've successfully managed to trap any entires that use 'http://' > 'www.' > with the standard '.com' '.org', '.net' endings. > > What I need to

RE: [PHP] Getting domain out of a URL

2007-01-17 Thread Jay Blanchard
[snip] I receive posts from an open moderated forum that need to be filtered for urls. I've successfully managed to trap any entires that use 'http://' 'www.' with the standard '.com' '.org', '.net' endings. What I need to do is to strip the prefix part ('http:// or http://www. or 'www') and su

[PHP] Getting domain out of a URL

2007-01-17 Thread Andre Dubuc
Hi, I receive posts from an open moderated forum that need to be filtered for urls. I've successfully managed to trap any entires that use 'http://' 'www.' with the standard '.com' '.org', '.net' endings. What I need to do is to strip the prefix part ('http:// or http://www. or 'www') and suff