// Check if site is preceeded by 'WWW'
public function checkWWW() {
$myDomain = $_SERVER['SERVER_NAME'];
$FindWWW = '.';
$POS = strpos($myDomain, $FindWWW);
if ($POS === false) {
return false;
} else {
return true;
// Check if site is preceeded by 'WWW'
public function checkWWW() {
$myDomain = $_SERVER['SERVER_NAME'];
$FindWWW = '.';
$POS = strpos($myDomain, $FindWWW);
if ($POS === false) {
return false;
} else {
return true;
On Fri, Feb 15, 2008 at 3:55 PM, nihilism machine
<[EMAIL PROTECTED]> wrote:
> Still doing the old behavior (www.www.domain.com)
This code works. You can see it in action at
http://www.pilotpig.net/code-library/checkwww.php and see the source
at http://www.pilotpig.net/code-library/source.php
Please don't start a new thread for every time you change a bit of
your code. It messes up the archives and fills people's inboxes.
In any case, change the following two functions as shown. You
were setting $this->WWW to False (with only one = operator), and you
should also use $_SERVER[
On Fri, Feb 15, 2008 at 3:18 PM, nihilism machine
<[EMAIL PROTECTED]> wrote:
> here is my function:
>
> // Check if site is preceeded by 'WWW'
> public function checkWWW() {
> $myDomain = $_SERVER['SERVER_NAME'];
> $FindWWW = '.';
>
here is my function:
// Check if site is preceeded by 'WWW'
public function checkWWW() {
$myDomain = $_SERVER['SERVER_NAME'];
$FindWWW = '.';
$POS = strpos($myDomain, $FindWWW);
if ($POS === false) {
6 matches
Mail list logo