 Jafo232You Can't Spell Democrat Without Rat.Premium join:2002-10-17 Boonville, NY 1 edit | reply to Jafo232
Re: PHP: Get TLD from URLActually your code is right, what I asked for is wrong. I need the domain name with the TLD, example:
http://www.dslreports.com/some/path/to/a/file.ext?name=value
To return just:
dslreports.com
Same with any URL:
http://somesubdomain.domain.com/path/to/somewhere
-- Custom PHP/Perl Development. Vbulletin And Wordpress Mods Too! |
|
|
|
 JAAuldeWeb DeveloperPremium,MVM join:2001-05-09 Williamsport, MD kudos:3 1 edit | Ahh, I see. Very well then:
»codepad.org/UXGS161q
If both TLD and "top level host" are found, you should get them back. Otherwise you get an empty string. |
|
 Jafo232You Can't Spell Democrat Without Rat.Premium join:2002-10-17 Boonville, NY | Thanks JAAulde! I will try this out. Hopefully it will work better than some of the other code I have tinkered with. -- Custom PHP/Perl Development. Vbulletin And Wordpress Mods Too! |
|
 Jafo232You Can't Spell Democrat Without Rat.Premium join:2002-10-17 Boonville, NY | reply to JAAulde JAAulde, shot your a private message.. |
|