查看單個文章
  #23  
舊 2004-08-26, 12:44 PM
hk2apple hk2apple 目前離線
進階會員
 
註冊日期: 2004-06-29
文章: 208
預設

我的tk轉址
代碼:
<?
$url=getenv("HTTP_REFERER");
$url2=parse_url($url);
$url=$url2[host];
$udomain =".iftp.tk";
$url = str_replace("http://", '', $url);
$url = str_replace("$udomain", '', $url);
$url = str_replace("www.", '', $url);
mysql_connect(localhost,username,password);
mysql_select_db(dbname);
$sql="select * from domain where domainname='$url'"; 
$result=mysql_query($sql);
$myrow=mysql_fetch_array($result);
echo "
<script> 
this.location ='$myrow[tourl]';
</script> ";
?>
如果是綁定的,只要打了子網址後到轉這便可以了
問題是綁定時打了沒有DNS子網址會DNS錯誤便怎麼也不能做了。
所以現在只可做.tk和用自設404做name.com/xyz那種。
回覆時引用此篇文章