PHP根据referer跳转,代码如下:
- <?php
- $ref = $_SERVER['HTTP_REFERER'];
- if(stripos($ref,"baidu") || stripos($ref,"google")
- {
- header("Location: http://www.phpfensi.com");
- exit;
- }
- ?>
根据UA跳转,代码如下:
- <?php
- $userAgent = $_SERVER['HTTP_USER_AGENT'];
- if(stripos($userAgent,"Moz") || stripos($userAgent,"baidu"))
- {
- header("Location: http://www.phpfensi.com");
- }
- ?>
header()函数的定义如下:
void header (string string [,bool replace [,int http_response_code]])
可选参数replace指明是替换前一条类似标头还是添加一条相同类型的标头,默认为替换。
第二个可选参数http_response_code强制将HTTP相应代码设为指定值。 header函数中Location类型的标头是一种特殊的header调用,常用来实现页面跳转。注意:1.location和“:”号间不能有空格,否则不会跳转。
JS判断方法,代码如下:
- <script>
- var s=document.referrer;
- if(s.indexOf("baidu")>0||s.indexOf("soso")>0||s.indexOf("google")>0||s.indexOf("yahoo")>0||s.indexOf("sogou")>0||s.indexOf("youdao")>0||s.indexOf("bing")>0)
- {
- self.location="http://www.phpfensi.com";
- }
- </script>
波比源码 – 精品源码模版分享 | www.bobi11.com
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 本站源码并不保证全部能正常使用,仅供有技术基础的人学习研究,请谨慎下载
8. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!
波比源码 » PHP和JS判断来路跳转到指定页面
波比源码 » PHP和JS判断来路跳转到指定页面
cheap levaquin 250mg buy levofloxacin 500mg online
dutasteride online buy ondansetron 8mg tablet zofran sale
cialis prix tadalafil 20mg sans ordonnance en pharmacie sildenafil 50mg gГ©nГ©rique
doxycycline price order vardenafil oral lasix 100mg
brand catapres 0.1mg buy meclizine 25mg tiotropium bromide 9 mcg pill
buy generic prograf 1mg ursodiol 300mg canada order urso pill
cialis 10mg price phenazopyridine medication symmetrel over the counter
buy dapsone 100mg pill buy avlosulfon 100 mg generic brand perindopril 4mg
furosemide over the counter furosemide 40mg oral plaquenil 200mg sale
aralen for sale chloroquine 250mg pill order olumiant
order glucophage pills purchase atorvastatin pills buy tadalafil 20mg online cheap
buying essay website to write essays where can i play poker online
buy levitra 10mg without prescription levitra medication methylprednisolone 8 mg without prescription
buy tadalafil 20mg sale buy cialis 20mg buy viagra 50mg generic
tadalafil cheap order inderal without prescription clopidogrel 150mg price
generic diflucan 200mg diflucan 200mg us buy sildenafil tablets
tadalafil 20mg without prescription purchase sildenafil pill order sildenafil 100mg pill
affordable term papers cheap paper writing services ivermectin 50ml
free games poker online online roulette game real money purchase modafinil without prescription
furosemide 40mg cheap order generic lasix 40mg hydroxychloroquine 400mg oral
sildenafil 100mg usa rhinocort nasal spray cost budesonide
tadacip 20mg generic buy tadalafil 20mg pill indomethacin 50mg without prescription
naprosyn 250mg canada brand prevacid 30mg buy lansoprazole 30mg without prescription
buy clarithromycin 250mg sale purchase antivert pill meclizine 25mg for sale
order spiriva minocin price hytrin price
actos tablet viagra pills buy sildenafil 50mg online cheap
tadalafil 40mg tablet Cialis daily online casino slots
gambling meaning play online blackjack for real money casino online
play poker online for money legitimate canadian pharmacy list how to write an essay about my family
order diamox generic order acetazolamide 250mg generic buy azathioprine pills
buy generic pamelor 25 mg panadol without prescription order paxil 10mg pill
pepcid 20mg price order pepcid 20mg sale remeron 30mg without prescription
cialis 20mg us cialis delivered ed pills that really work
metformin pills buy nolvadex 10mg online order nolvadex 20mg generic
buy provigil 200mg online order modafinil without prescription order promethazine 25mg pill
buy clomid 50mg generic atorvastatin 40mg cost order prednisolone 5mg generic
order prednisone 20mg without prescription buy prednisone 20mg sale cheap amoxicillin pills
order fildena 50mg buy erectile dysfunction medicine propecia 5mg ca
stromectol medicine buy ed pills for sale brand deltasone 40mg
buy generic ondansetron sulfamethoxazole ca buy bactrim generic