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;}