I found this on some other forums and some guy says that he is using this to host several website using one shared hosting account... I would assume that you would need a dedicated IP and a DNS host such as ZoneEdit to do this but is this logistical and what side effects could / would there be?
<?php
## support in case you want to mirror your domains locally.
## I always set my local domains to local.mydomain.com in the
## c:/windows/host file as well as the http.conf file of my apache server
if (strstr($HTTP_HOST, 'local.'))
{
$where='local';
}
else
{
$where='www';
}
### your domain list
$host['myFirstDomain.com']="http://$where.mydomain.com/index_01.php";
### php scripts must be accessed via the internet
$host['myOtherDomain.org']="./index_02.html";
### html files can be accessed directly
$host['myThirdDomain.net']="./third/index.html";
### accessing a page in a folder
### You can have as many domains in the list as you like
### laod the file and display it.
reset ($host);
while (list ($key, $val) = each ($host))
{
if(stristr($HTTP_HOST, $key))
{
$found='yes';
$file=file($val);
$html=join('', $file);
print $html;
}
}
### Stuff to display if accesed via IP, rather than any of the domains
if(!found)
{
echo "
<html>
<head>
<title></title>
</head>
<body>
<font face=verdana>
<p align=center>";
$datestamp = date("M. jS, Y &\\n\b\s\p\; g:ia");
$name = gethostbyaddr ($REMOTE_ADDR);
echo "It is currently $datestamp Central Time.<br>
You are $name at $REMOTE_ADDR<br>Your activity is being logged.</p>
<p align=center> </p>
<p align=center>You have reached the IP address</p>
<p align=center><font size=6 color=#FF0000><b>64.49.228.141</b></font></p>
<p align=center>There is nothing here for you to see. Please go away.</p>
</font>
</body>
</html>
";
}
?>