Thread: php question
View Single Post
Old 07-23-2009, 11:33 PM  
cLin
Registered User
 
Industry Role:
Join Date: May 2009
Location: Orange County, CA
Posts: 94
Code:
$domain_strip = preg_replace("/^(.*\.)?([^.]*\..*)$/", "$2", $_SERVER['HTTP_HOST']);
$domain = substr($domain_strip, 0, strpos($domain_strip, "."));
Grabs the domain name from website url. If that's what you want.
__________________
Chris
The Ex Girlfriend Pics
cLin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook