|
|
|
|
|
|
|
![]() |
#1 |
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
|
QuickDraw, kitty_kate:
My submission rules do not permit IP address URLs, so that is not an issue. QuickDraw: Thanks for the function. Yes it appears do what I want it to... in that it gets the domain name... but it still has the issue I mentioned in post 7, where it matches similarly named, longer domains.
__________________
Playboy Webmasters - The name says it all! $35 per signup or 60% revshare. |
![]() |
![]() |
![]() |
#2 |
You can now put whatever you want in this space :)
|
Code:
function base_domain($url) { // parse out subdomains $url = parse_url($url); $host = $url['host']; $pattern = "/([\-a-z0-9]*\.)?([\-a-z0-9]*)\.([a-z0-9]*)/i"; preg_match($pattern, $host, $matches); $host = $matches[2] ."." .$matches[3]; return $host; }
__________________
Success is going from failure to failure without a loss of enthusiasm. Last edited by Halfdeck; 2006-10-18 at 09:08 AM.. |
![]() |
![]() |
![]() |
#3 |
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
|
Yes, Halfdeck. Also does the same as the others that have been mentioned. Thanks anyway.
__________________
Playboy Webmasters - The name says it all! $35 per signup or 60% revshare. |
![]() |
![]() |
![]() |
|
|