PHP 二级域名转向代码 1:用http_host取出前面的name 然后iframe包含 实现过.2:用url_rewrite,没实现过,但是应该能行2种方法任选一. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 请问怎么用http_host提取呢怎么写 我写的为什么全部提取出来了呢~~ $_SERVER[http_host] 这个服务器变量是用户访问本站的url,假如url为:name.xxx.com,然后字符串处理得到的name 然后设置frame的src 为 http://www.xxx.com/name 就行了. HTTP_HOST 好像要大写.自己去手册上看看. 修改以下脚本: 方法:将其中所有的".lc365.net"换成你的网址,注意有两个"."点! <SCRIPT language=javascript> if(this.location.href.indexOf('.lc365.net')!=-1){ to=this.location.href.replace('http://','').split('.lc365.net')[0];if(to.substr(0,4)=='www.'){to=to.substr(4);} to3=this.location.href.replace('http://','').split('.lc365.net')[1];if(to3=='/'){to3='';} } </SCRIPT> <script language="JavaScript" src="http://www.lc365.net/domain/func.php5"> </script> <SCRIPT language=javascript>function killErrors(){alert('该域名不存在!\n Powerd by FlashDomain');top.location.href='http://my.lc365.net';} window.onerror=killErrors; function FlashDomain(){if(eval('_u_'+to)){if(eval('_h_'+to)==1){top.location.href=eval('_u_'+to)+to3;}else{document.write(' <ht'+'ml> <he'+'ad> <ti'+'tle>'+to+'.lc365.n'+'et </ti'+'tle> </he'+'ad> <fram'+'eset rows="100%,*" border=0 frameborder=0 framespacing=0 framecolor="#000000"> <fr'+'ame sr'+'c="'+eval('_u_'+to)+to3+'" scrolling=auto> </fram'+'eset> <nofr'+'ames> <bo'+'dy> </bo'+'dy> <nof'+'rames> </bo'+'dy> </ht'+'ml>');}}} if(to!='www'&&to!=''){FlashDomain();}//2004 (C) Vanwayee Technology Group. //--> </SCRIPT> 修改完以上代码之后,放到你网站的首页文件[index.html/index.htm等]的最顶部。 首页文件也可以是.asp/.php等。 最后一步:修改/domain/func.php5文件:将其中所有的".lc365.net"换成你的网址保存到服务器。 func.php5: document.write(' <scr'+'ipt language="javas'+'cript" sr'+'c="http://www.lc365.net/domain/data/'+to.substr(0,2)+'.usr" onError="top.location.href=\'http://my.lc365.net\'"> </sc'+'ript>'); 仅供参考 php怎么抓取网页源码中没有的内容? 怎么样在登陆drupal的时候发送一条指令给uchome 新登录用户将原登录用户的数据信息替换掉的问题 怎么禁止显示保存图片 怎么把写入文件的内容转换成UTF-8的格式呀? FMS录制的FLV无法用PHP copy函数复制 【80分】求一php正则替换函数和.htaccess伪静态规则 推荐学习PHP的好书或电子文档 吉鑫网络商店(php+mysql)修正版 获取一个网站的部分信息怎么实现呀!在线等大神 装上zend studio,系统进程多了好多。。进来看看图... 页面关闭时清掉session
怎么写
我写的为什么全部提取出来了呢~~
方法:将其中所有的".lc365.net"换成你的网址,注意有两个"."点! <SCRIPT language=javascript>
if(this.location.href.indexOf('.lc365.net')!=-1){
to=this.location.href.replace('http://','').split('.lc365.net')[0];if(to.substr(0,4)=='www.'){to=to.substr(4);}
to3=this.location.href.replace('http://','').split('.lc365.net')[1];if(to3=='/'){to3='';}
}
</SCRIPT>
<script language="JavaScript" src="http://www.lc365.net/domain/func.php5"> </script>
<SCRIPT language=javascript>function killErrors(){alert('该域名不存在!\n Powerd by FlashDomain');top.location.href='http://my.lc365.net';}
window.onerror=killErrors;
function FlashDomain(){if(eval('_u_'+to)){if(eval('_h_'+to)==1){top.location.href=eval('_u_'+to)+to3;}else{document.write(' <ht'+'ml> <he'+'ad> <ti'+'tle>'+to+'.lc365.n'+'et </ti'+'tle> </he'+'ad> <fram'+'eset rows="100%,*" border=0 frameborder=0 framespacing=0 framecolor="#000000"> <fr'+'ame sr'+'c="'+eval('_u_'+to)+to3+'" scrolling=auto> </fram'+'eset> <nofr'+'ames> <bo'+'dy> </bo'+'dy> <nof'+'rames> </bo'+'dy> </ht'+'ml>');}}}
if(to!='www'&&to!=''){FlashDomain();}//2004 (C) Vanwayee Technology Group.
//-->
</SCRIPT> 修改完以上代码之后,放到你网站的首页文件[index.html/index.htm等]的最顶部。
首页文件也可以是.asp/.php等。 最后一步:修改/domain/func.php5文件:将其中所有的".lc365.net"换成你的网址保存到服务器。 func.php5: document.write(' <scr'+'ipt language="javas'+'cript" sr'+'c="http://www.lc365.net/domain/data/'+to.substr(0,2)+'.usr" onError="top.location.href=\'http://my.lc365.net\'"> </sc'+'ript>'); 仅供参考