PHP How to encrypt the URL ah, not particularly long

Source: Internet
Author: User
Tags urlencode
PHP How to encrypt the URL ah, not particularly long

Reply content:

PHP How to encrypt the URL ah, not particularly long

urlencode, not part of encryption

UrlEncode

I don't know how you're going to encrypt it, is that it? This is encoded with UrlEncode, of course, only parsing Chinese characters and some special characters, such as a plus or something.
www.xmy365.com/search/apachesolr_search/%5B%E9%87%91%E9%BE%99%E4%B9%A1%E6%9E%9C%E4%B8%9A%5D%20%E7%94%98%E8%82% 83%e9%9d%99%e5%ae%81%e7%ba%a2%e5%af%8c%e5%a3%ab%2012%e4%b8%aa%e7%9b%92 (%e7%ba%a62.3kg)

If it is url passed as a parameter, it is recommended to use it base64_encode for encoding. Replacing unsafe characters at the same time

//处理为URL安全模式function reflowURLSafeBase64($str){    $str=str_replace("/","_",$str);    $str=str_replace("+","-",$str);    return $str;}//反解function reflowNormalBase64($str){    $str=str_replace("_","/",$str);    $str=str_replace("-","+",$str);    return $str;}
  • 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.