Wildcard Dns
Collapse
X
-
lol mate wow ?
but i can cut out my grim-reaper/users/?grim-reaper and only use grim-reaper.grim-reaper lolVisit: Chat4u.mobi - The New Lay Of being a site of your dreams!
Visit: WapMasterz Coming Back Soon!
_______
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...
_______
Info & Tips
php.net
w3schools.com
Comment
-
thats because co.cc domain will generate 4 exploded part in case of submdomain like username.domain.co.cc
so the code will be
[/b]Code:<?php $domain = $_SERVER['HTTP_HOST']; $domain_parts = explode('.',$domain); include("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."'")); $loc = "http://4wap.co.cc/sites/index.php?name=$users[0]"; if($users[0]!= "") { @header("Location:$loc"); } else { @header("location: http://spiderwap.co.za"); } } ?>
think it should beCode:WHERE name='".$domain_parts[0]."'
Comment
-
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.Code:<?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"); } ?>
Comment



Comment