check if website has www. in front of domain
| From: | nihilism machine | Date: | Fri, 15 Feb 2008 20:18:10 +0000 |
| Subject: | check if website has www. in front of domain | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-269376@lists.php.net to get a copy of this message | ||
here is my function:
// Check if site is preceeded by 'WWW'
public function checkWWW() {
$myDomain = $_SERVER['SERVER_NAME'];
$FindWWW = 'wwww.';
$POS = strpos($myDomain, $FindWWW);
if ($POS === false) {
return false;
} else {
return true;
}
}
any idea why this is not working? just trying to test if the site is www.site.com and not site.com
-------------------------------
Edward H. Hotchkiss
Chief Technical Officer
Durgle, INC
edward@durgle.com
http://www.durgle.com
-------------------------------