http://gerhut.net/pokedata
每次调取页面都是从PGwiki上读取即时内容然后自动抽取出内容整理出来的。
应该是理论上看到同样内容下耗费流量最低值了,适合流量限制的终端使用。
核心抽取代码:
function loadPage(url)
{
var req = Server.CreateObject("MSXML2.XMLHTTP");
req.open("GET", url, false);
req.send();
if(req.readyState != 4)
return "ReadyState=" + req.readyState;
if(req.status != 200)
return "Status=" + req.status;
var cont = req.responseBody;
req = null;
var str = Server.CreateObject("ADODB.Stream");
str.type = 1;
str.mode = 3;
str.open();
str.write(cont);
str.position = 0;
str.type = 2;
str.charset = "utf-8";
cont = str.readText();
str.close();
str = null;
return cont;
}