[转载] 网址方向转换转义符
1 $arr = array(" "=>"20%","!"=>"21%","\""=>"22%","#"=>"23%","$"=>"24%","%"=>"25%","&"=>"26%","'"=>"27%","("=>"28%",")"=>"29%","*"=>"%2A ","+"=>"%2B ",","=>"%2C ","-"=>"%2D ","."=>"%2E ","/"=>"%2F ",":"=>"%3A ",";"=>"%3B ","<"=>"%3C ","="=>"%3D ",">"=>"%3E ","?"=>"%3F ","@"=>"40%","["=>"%5B ","]"=>"%5D ","^"=>"%5E ","_"=>"%5F ","`"=>"60%","{"=>"%7B ","|"=>"%7C ","}"=>"%7D ","~"=>"%7E"); 2 3 $strecho = "https://i.cnblogs.com/?url=".str_ireplace(" ","",strtr($keyword,$arr));