...at least I *think* that's what is happening...
The purpose is to be able to re-use content on different subdomains while maintaining unique graphics & links for each subdomain so I wrote a switch script to define path to correct files for each subdomain based on the referring link. (see below)
I've done trouble shooting and narrowed the problem to one php script (sample page to show problem at:
http://www.sensibledriver.com/emagarticles/archives/safedriving/petsafety.php )
There is a numeral "1" generated and printed from *somewhere* that I can't figure out.
Any help from this forum would be GREATLY appreciated.
The script looks like this (several cases removed for brevity) :
<?php
$server = $_SERVER['HTTP_REFERER'];
$server2 = $_SERVER['QUERY_STRING'];
if (strstr($server2, "dealer"))
{
$server = $_SERVER['QUERY_STRING'];
}
else
{
$server = $_SERVER['HTTP_REFERER'];
}
$server1 = substr ($server,7);
$server_parts = explode(".", $server1);
//breaks up the following URL
//http://dealername.site.com/document/path.php
switch ($server_parts[0])
{
case "": //no dealername, no www
$array[0] = include ('
http://www.site.com/path-to/file.inc'); print_r( $array[0] );
break;
case "subdomain": //this block repeated for several subdomains
$array[0] = include ('
http://www.site.com/path-to/file.inc'); print_r( $array[0] );
break;
default:
$array[0] = include ('
http://www.site.com/path-to/file.inc'); print_r( $array[0] );
break;
}
/////////////////////////////////
//breaks up the following URL
//http://www.site.com/document/path.php?dealer=dealername
$dealer = explode("=", $server);
switch ($dealer[0])
{
case "dealername1":
$array[0] = include ('
http://www.site.com/path-to/file.inc'); print_r( $array[0] );
break;
case "dealername2": //repeat for several dealernames
$array[0] = include ('
http://www.site.com/path-to/file.inc'); print_r( $array[0] );
break;
}
?>