比如我现在有一个这样的字符串%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%20Wed%2c%202%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%27s%20sponsorship%20of%20the%20domain%20name%20registration%20in%20the%20registry%20is%20%0acurrently%20set%20to%20expire%2e%20This%20date%20does%20not%20necessarily%20reflect%20the%20%0aexpiration%20date%20of%20the%20domain%20name%20registrant%27s%20agreement%20with%20the%20%0asponsoring%20registrar%2e%20%20Users%20may%20consult%20the%20sponsoring%20registrar%27s%20%0aWhois%20database%20to%20view%20the%20registrar%27s%20reported%20date%20of%20expiration%20%0afor%20this%20registration%2e%0a%0aTERMS%20OF%20USE%3a%20You%20are%20not%20authorized%20to%20access%20or%20query我用php的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: Wed, 2 Jun 2010 08:02:29 EDT <<< NOTICE: The expiration date displayed in this record is the date the registrar's sponsorship of the domain name registration in the registry is currently set to expire. This date does not necessarily reflect the expiration date of the domain name registrant's agreement with the sponsoring registrar. Users may consult the sponsoring registrar's Whois database to view the registrar's reported date of expiration for this registration.但是我在这里解密http://tool.chinaz.com/Tools/Encode.aspx却能得到这样的结果Whois Server Version 1.0Domain 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: Wed, 2 Jun 2010 08:02:29 EDT <<<NOTICE: The expiration date displayed in this record is the date the
registrar's sponsorship of the domain name registration in the registry is
currently set to expire. This date does not necessarily reflect the
expiration date of the domain name registrant's agreement with the
sponsoring registrar. Users may consult the sponsoring registrar's
Whois database to view the registrar's reported date of expiration
for this registration.TERMS OF USE: You are not authorized to access or query---我也想要这样的结果,怎么办?就是字符串解密后,能够根据情况自动换行的。
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: Wed, 2 Jun 2010 08:02:29 EDT <<<NOTICE: The expiration date displayed in this record is the date the
registrar's sponsorship of the domain name registration in the registry is
currently set to expire. This date does not necessarily reflect the
expiration date of the domain name registrant's agreement with the
sponsoring registrar. Users may consult the sponsoring registrar's
Whois database to view the registrar's reported date of expiration
for this registration.TERMS OF USE: You are not authorized to access or query---我也想要这样的结果,怎么办?就是字符串解密后,能够根据情况自动换行的。
$s1 = '';
$arr = explode('%', $s);
foreach($arr as $k => $v){
$s1 .= '%'.substr($v, 0, 2);
}echo urldecode($s1);exit;
其他的单词变量自己试着解下,现在又点忙
$str = '%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%20Wed%2c%202%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%27s%20sponsorship%20of%20the%20domain%20name%20registration%20in%20the%20registry%20is%20%0acurrently%20set%20to%20expire%2e%20This%20date%20does%20not%20necessarily%20reflect%20the%20%0aexpiration%20date%20of%20the%20domain%20name%20registrant%27s%20agreement%20with%20the%20%0asponsoring%20registrar%2e%20%20Users%20may%20consult%20the%20sponsoring%20registrar%27s%20%0aWhois%20database%20to%20view%20the%20registrar%27s%20reported%20date%20of%20expiration%20%0afor%20this%20registration%2e%0a%0aTERMS%20OF%20USE%3a%20You%20are%20not%20authorized%20to%20access%20or%20query';
$str = urldecode($str);
echo "<pre>$str</pre><hr>";
//或者
echo nl2br($str);
?>
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: Wed, 2 Jun 2010 08:02:29 EDT <<< NOTICE: The expiration date displayed in this record is the date the registrar's sponsorship of the domain name registration in the registry is currently set to expire. This date does not necessarily reflect the expiration date of the domain name registrant's agreement with the sponsoring registrar. Users may consult the sponsoring registrar's Whois database to view the registrar's reported date of expiration for this registration.