Ok, i thought i had it sorted out.
But I'm having a little problem....
I got my virual subdomains to work, thanx to sub that remembered me strugling with it on my current host.
So now i got it working...
But with my current host i strugled to get it working, but he helped me and we got it to wrok...
Now my problem is, it doesn't want to redirect to the correct username (sites/index.php?name=$name)
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______…
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______…
Ok,,, so if i red the source right the code in my case should be.
<?php
$domain = $_SERVER['HTTP_HOST'];
$domain_parts = explode('.',$domain);
if (count($domain_parts) == 3 && $domain_parts[0]!= "www") { // make sure a subdomain is called
$users=mysql_query(mysql_fetch_array("SELECT name FROM users WHERE name='".$domain_parts."'"));
$users[0] = $domain_parts[0];
$loc = "http://4wap.co.cc/sites/index.pnp?name=$users[0]";
@header("Location:$loc");
}
?>
<?php
$domain = $_SERVER['HTTP_HOST'];
$domain_parts = explode('.',$domain);
include("config.php");
if (count($domain_parts) == 3 && $domain_parts[0]!= "www") { // make sure a subdomain is called
$users=mysql_fetch_array(mysql_query("SELECT name FROM users WHERE name='".$domain_parts."'"));
$loc = "http://4wap.co.cc/sites/index.php?name=$users[0]";
@header("Location:$loc");
}
?>
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______…
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______…
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______…
<?php
$domain = $_SERVER['HTTP_HOST'];
$domain_parts = explode('.',$domain);
include("4wap/config.php");
if (count($domain_parts) == 4 && $domain_parts[0]!= "www") { // make sure a subdomain is called
$users=mysql_fetch_array(mysql_query("SELECT name FROM users WHERE name='".$domain_parts[0]."'"));
}
if ($users[0]=="")
{
header("location: http://spiderwap.co.za/home.php");
}else{
$loc = "http://4wap.co.cc/sites/index.php?name=$users[0]";
header("Location:$loc");
}
?>
It works perfect, but funny, i realised that i must use it with my survers primary domain.... and i have a few domains related to my surver, i did a mod on this peace of coding (after having a good nap) and then looked at it again, and realised that it wouldn't have worked with the 4wap domain cause $_SERVER['HTTP_HOST']; goes according to your primary domain name.