请问有谁知道怎么把 http://www.google.com
变成:  aHR0cDovL3d3dy5nb29nbGUuY29t或者说这是什么加密的方式,或是 URL编码吗?
例如这个网站
http://www.naminglai.com/index.php传递给它一个get参数 :aHR0cDovL3d3dy5nb29nbGUuY29t 
http://www.naminglai.com/index.php?q=aHR0cDovL3d3dy5nb29nbGUuY29t&hl=3ed

解决方案 »

  1.   

    自己写个加密函数,或者用3des就可以.
      

  2.   

    自己写加密函数,记得生成的字符不能含有url的转移字符。
      

  3.   

    继续  up小弟我也在 php论坛那边提问了,那边有人回答:http://topic.csdn.net/u/20080614/10/19c4b7df-c20d-4ec3-b574-f7cecb399105.html但问题的关键是...我连 php的环境都没配过...用了1年 ASP 2年 NET 但从来都没用过 PHP 我晕啊..........
      

  4.   

                byte[] data = Encoding.UTF8.GetBytes(sInputString);
                DESCryptoServiceProvider DES = new DESCryptoServiceProvider();
                DES.Key = ASCIIEncoding.ASCII.GetBytes(sKey);
                DES.IV = ASCIIEncoding.ASCII.GetBytes(sKey);
                ICryptoTransform desencrypt = DES.CreateEncryptor();
                byte[] result = desencrypt.TransformFinalBlock(data, 0, data.Length);
                return BitConverter.ToString(result);            string[] sInput = sInputString.Split("-".ToCharArray());
                byte[] data = new byte[sInput.Length];
                for (int i = 0; i < sInput.Length; i++)
                {
                    data[i] = byte.Parse(sInput[i], NumberStyles.HexNumber);
                }
                DESCryptoServiceProvider DES = new DESCryptoServiceProvider();
                DES.Key = ASCIIEncoding.ASCII.GetBytes(sKey);
                DES.IV = ASCIIEncoding.ASCII.GetBytes(sKey);
                ICryptoTransform desencrypt = DES.CreateDecryptor();
                byte[] result = desencrypt.TransformFinalBlock(data, 0, data.Length);
                return Encoding.UTF8.GetString(result);
      

  5.   

    找到答案啦,哈哈http://hi.baidu.com/miny/blog/item/af967aec201ec8d22e2e21f1.html多谢各位!