Seeking a search engine to route judgment code to jump to solve the method

Source: Internet
Author: User
Ask a search engine to route the code to jump
Ask the hero to write a search engine routing judgment code to jump
If it's Baidu, jump to http://aaaa.com.
If it's Google, it's going to http://bbbb.com.
If it's a sogou, jump to http://cccc.com.
Direct input will not jump
Thank you.

------Solution--------------------
I don't know what you're doing, or maybe it's just an industry, here's a case. I don't think you're going to get a link from baidu.com. Haha, so to use the actual war should be replaced by the way of the comparison. These are all self-improvement.

PHP Code
$RURL = $_server [' Http_referer '];if (! empty ($RURL)) {    $UArray = Parse_url ($RURL);    $UHost = $UArray [' host '];    Switch ($UHost) {case        ' www.baidu.com ':            header ("location:http://aaa.com");            break;        Case ' www.google.com ':            header ("location:http://bbb.com");            break;        Case ' www.sogou.com ':            header ("location:http://ccc.com");            break;        Default:            echo $UHost;            break;    }} echo ' direct input ';
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.