一个网站接口返回的字符串:%0aWhois%20Server%20Version%201%2e0%0a%0aDomain%20names%20can%20now%20be%20registered%20with%20many%20different%20competing%20registrars%2e%20%0aGo%20to%20http%3a%2f%2fregistrar%2everisign%2dgrs%2ecom%2fwhois%2f%20for%20detailed%20information%2e%0a%0a%20%20%20Domain%20Name%3a%20IZB%2eCC%0a%20%20%20Registrar%3a%201%20API%20GMBH%0a%20%20%20Whois%20Server%3a%20whois%2e1api%2enet%0a%20%20%20Referral%20URL%3a%20http%3a%2f%2fwww%2e1api%2enet%0a%20%20%20Name%20Server%3a%20FREE01%2eEDITDNS%2eNET%0a%20%20%20Name%20Server%3a%20FREE02%2eEDITDNS%2eNET%0a%20%20%20Status%3a%20ACTIVE%0a%20%20%20Updated%20Date%3a%2013%2dmay%2d2010%0a%20%20%20Creation%20Date%3a%2002%2doct%2d2009%0a%20%20%20Expiration%20Date%3a%2002%2doct%2d2010%0a%0a%0a%3e%3e%3e%20Last%20update%20of%20whois%20database%3a%20Tue%2c%201%20Jun%202010%2008%3a02%3a29%20EDT%20%3c%3c%3c%0a%0aNOTICE%3a%20The%20expiration%20date%20displayed%20in%20this%20record%20is%20the%20date%20the%20%0aregistrar
应该怎么把它解码成正确的信息显示出来呢?

解决方案 »

  1.   

    //URLDecode
     Whois Server Version 1.0  Domain names can now be registered with many different competing registrars.  Go to http://registrar.verisign-grs.com/whois/ for detailed information.     Domain Name: IZB.CC    Registrar: 1 API GMBH    Whois Server: whois.1api.net    Referral URL: http://www.1api.net    Name Server: FREE01.EDITDNS.NET    Name Server: FREE02.EDITDNS.NET    Status: ACTIVE    Updated Date: 13-may-2010    Creation Date: 02-oct-2009    Expiration Date: 02-oct-2010   >>> Last update of whois database: Tue, 1 Jun 2010 08:02:29 EDT <<<  NOTICE: The expiration date displayed in this record is the date the  registrar
      

  2.   


    谢谢,我知道了。可是我解码后的字符串和你的一样,全部在一行上面。我要怎样才能达到下面这样的效果呢?让它换行显示,这样排版要整齐多了---Whois Server Version 1.0Domain names can now be registered with many different competing registrars. 
    Go to http