请教curl问题

albert_hjk
  • 259

现在准备做个简单的链接检测。 然后用了 curl_init();

类似于命令行的 curl

但是我发现很多网站都做了js的链接跳转。 http_code 的还是200. 页面如下。

<html>
<head>
</head>
<body>
    <script type="text/javascript" language="javascript">

        var locname = location.hostname;
        if ((locname == "www.icbc.co.id")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E5%8D%B0%E5%B0%BC%E7%BD%91%E7%AB%99/it/default.htm";
        }
    </script>
    <script src="/SiteCollectionDocuments/ICBC/Resources/WapDefaultFilter.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        function is_iPad() {
            var ua = navigator.userAgent.toLowerCase();
            if (ua.match(/iPad/i) == "ipad") {
                return true;
            } else {
                return false;
            }
        }
        var locname = location.hostname;
        if ((locname == "www.icbc.com.cn") || (locname == "www.95588.com")) {
            if (is_iPad()) {
                window.location = "/icbc/ipad/default.htm";
            }
            else {
                window.location = "/icbc/";
            }
        }
        else if (locname == "www.icbc-ltd.com") {
            window.location = "/icbcltd/";
        }
        else if ((locname == "www.bj.icbc.com.cn") || (locname == "www.95588bj.com") || (locname == "www.95588bj.com.cn") || (locname == "www.95588bj.net") || (locname == "www.95588bj.net.cn")) {
            window.location = "/icbc/%e5%8c%97%e4%ba%ac%e5%88%86%e8%a1%8c/";
        }
        else if ((locname == "www.tj.icbc.com.cn")) {
            window.location = "/icbc/%e5%a4%a9%e6%b4%a5%e5%88%86%e8%a1%8c/";
        }
        else if ((locname == "www.gd.icbc.com.cn")) {
            window.location = "/icbc/%e5%b9%bf%e4%b8%9c%e5%88%86%e8%a1%8c/";
        }
        else if ((locname == "www.sh.icbc.com.cn") || (locname == "www.my95588.com")) {
            window.location = "/icbc/%e4%b8%8a%e6%b5%b7%e5%88%86%e8%a1%8c/";
        }
        else if ((locname == "www.sz.icbc.com.cn")) {
            window.location = "/icbc/%e6%b7%b1%e5%9c%b3%e5%88%86%e8%a1%8c/";
        }
        else if ((locname == "www.zj.icbc.com.cn")) {
            window.location = "/icbc/%e6%b5%99%e6%b1%9f%e5%88%86%e8%a1%8c/";
        }
        else if ((locname == "icbc.com.cn")) {
            window.location = "http://www.icbc.com.cn/icbc/";
        }
        else if ((locname == "www.us.95588.com") || (locname == "www.icbkus.com")) {
            window.location = "/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e7%ba%bd%e7%ba%a6%e7%bd%91%e7%ab%99/%e9%a6%96%e9%a1%b5/default.htm";
        }
        else if ((locname == "www.icbc.lu")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%8d%a2%e6%a3%ae%e5%a0%a1%e5%88%86%e8%a1%8c%e7%bd%91%e7%ab%99/en/default.htm";
        }
        else if ((locname == "www.icbcme.ae")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e4%b8%ad%e4%b8%9c%e7%bd%91%e7%ab%99/en/";
        }
        else if ((locname == "www.icbc.com.qa")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%a4%9a%e5%93%88%e7%bd%91%e7%ab%99/en/";
        }
        else if ((locname == "www.icbcindo.com")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%8d%b0%e5%b0%bc%e7%bd%91%e7%ab%99/EnglishSite/";
        }
        else if ((locname == "icbcindo.com")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%8d%b0%e5%b0%bc%e7%bd%91%e7%ab%99/EnglishSite/";
        }
        else if ((locname == "www.icbcina.com")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%8d%b0%e5%b0%bc%e7%bd%91%e7%ab%99/EnglishSite/";
        }
        else if ((locname == "icbcina.com")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%8d%b0%e5%b0%bc%e7%bd%91%e7%ab%99/EnglishSite/";
        }
        else if ((locname == "www.icbc.co.id")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E5%8D%B0%E5%B0%BC%E7%BD%91%E7%AB%99/it/default.htm";
        }
        else if ((locname == "job.icbc.com.cn")) {
            window.location = "/ICBC/%e4%ba%ba%e6%89%8d%e6%8b%9b%e8%81%98/default.htm";
        }
        else if ((locname == "www.icbc.co.jp") || (locname == "icbc.co.jp")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e4%b8%9c%e4%ba%ac%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "www.icbc.com.au")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E6%82%89%E5%B0%BC%E7%BD%91%E7%AB%99/en/";
        }
        else if ((locname == "www.icbkfs.com")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%b7%a5%e9%93%b6%e9%87%91%e8%9e%8d%e7%bd%91%e7%ab%99/EN/";
        }
        else if ((locname == "www.icbcmy.com")) {
            window.location = "/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e9%a9%ac%e6%9d%a5%e8%a5%bf%e4%ba%9a%e7%bd%91%e7%ab%99/en/";
        }
        else if ((locname == "www.icbcalmaty.kz")) {
            window.location = "/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e9%98%bf%e6%8b%89%e6%9c%a8%e5%9b%be%e7%bd%91%e7%ab%99/cn/";
        }
        else if ((locname == "www.icbcit.com")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E7%B1%B3%E5%85%B0%E7%BD%91%E7%AB%99/cn/default.htm";
        }
        else if ((locname == "www.icbcindia.com")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%ad%9f%e4%b9%b0%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "www.icbcph.com")) {
            window.location = "/icbc/%E6%9D%91%E9%95%87%E9%93%B6%E8%A1%8C/%E5%B9%B3%E6%B9%96%E6%9D%91%E9%95%87%E9%93%B6%E8%A1%8C%E7%BD%91%E7%AB%99/";
        }
        else if ((locname == "www.icbcph.com.cn")) {
            window.location = "/icbc/%E6%9D%91%E9%95%87%E9%93%B6%E8%A1%8C/%E5%B9%B3%E6%B9%96%E6%9D%91%E9%95%87%E9%93%B6%E8%A1%8C%E7%BD%91%E7%AB%99/";
        }
        else if ((locname == "www.icbc.com.la")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e4%b8%87%e8%b1%a1%e7%bd%91%e7%ab%99/cn/";
        }
        else if ((locname == "www.icbc.com.kh")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e9%87%91%e8%be%b9%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "www.icbc-us.com")) {
            window.location = "/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%b7%a5%e9%93%b6%e7%be%8e%e5%9b%bd%e7%bd%91%e7%ab%99/en/default.htm";
        }
        else if ((locname == "www.icbcpl.com")) {
            window.location = "/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%8d%8e%e6%b2%99%e7%bd%91%e7%ab%99/pl/default.htm";
        }
        else if ((locname == "www.icbc.eu")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E5%B7%A5%E9%93%B6%E6%AC%A7%E6%B4%B2%E7%BD%91%E7%AB%99/en/default.htm";
        }
        else if ((locname == "www.gx.icbc.com.cn")) {
            window.location = "/icbc/%e5%b9%bf%e8%a5%bf%e5%88%86%e8%a1%8c/";
        }
        else if ((locname == "www.icbc.com.pe")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E5%B7%A5%E9%93%B6%E7%A7%98%E9%B2%81%E7%BD%91%E7%AB%99/es/default.htm";
        }
        else if ((locname == "www.icbcbr.com.br")) {
            window.location = "/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%b7%a5%e9%93%b6%e5%b7%b4%e8%a5%bf/EN/default.htm";
        }
        else if ((locname == "indonesia.icbc.com.cn")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E5%8D%B0%E5%B0%BC%E7%BD%91%E7%AB%99/%E4%B8%AD%E6%96%87%E7%AB%99%E7%82%B9/default.htm";
        }
        else if ((locname == "malaysia.icbc.com.cn")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E9%A9%AC%E6%9D%A5%E8%A5%BF%E4%BA%9A%E7%BD%91%E7%AB%99/cn/default.htm";
        }
        else if ((locname == "milan.icbc.com.cn")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E7%B1%B3%E5%85%B0%E7%BD%91%E7%AB%99/cn/default.htm";
        }
        else if ((locname == "japan.icbc.com.cn")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e4%b8%9c%e4%ba%ac%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "middleeast.icbc.com.cn")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E4%B8%AD%E4%B8%9C%E7%BD%91%E7%AB%99/cn/default.htm";
        }
        else if ((locname == "doha.icbc.com.cn")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E5%A4%9A%E5%93%88%E7%BD%91%E7%AB%99/cn/default.htm";
        }
        else if ((locname == "kz.icbc.com.cn")) {
            window.location = "/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e9%98%bf%e6%8b%89%e6%9c%a8%e5%9b%be%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "karachi.icbc.com.cn")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%8d%a1%e6%8b%89%e5%a5%87%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "au.icbc.com.cn")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e6%82%89%e5%b0%bc%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "luxembourg.icbc.com.cn")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%8d%a2%e6%a3%ae%e5%a0%a1%e5%88%86%e8%a1%8c%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "singapore.icbc.com.cn")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e6%96%b0%e5%8a%a0%e5%9d%a1%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "hanoi.icbc.com.cn")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e6%b2%b3%e5%86%85%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "abudhabi.icbc.com.cn")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e9%98%bf%e5%b8%83%e6%89%8e%e6%af%94%e7%bd%91%e7%ab%99/cn/";
        }
        else if ((locname == "india.icbc.com.cn")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%ad%9f%e4%b9%b0%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "phnompenh.icbc.com.cn")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e9%87%91%e8%be%b9%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "spain.icbc.com.cn")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e8%a5%bf%e7%8f%ad%e7%89%99%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "paris.icbc.com.cn")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E5%B7%B4%E9%BB%8E%E7%BD%91%E7%AB%99/cn/default.htm";
        }
        else if ((locname == "brussels.icbc.com.cn")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%b8%83%e9%b2%81%e5%a1%9e%e5%b0%94%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "amsterdam.icbc.com.cn")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E9%98%BF%E5%A7%86%E6%96%AF%E7%89%B9%E4%B8%B9%E7%BD%91%E7%AB%99/cn/default.htm";
        }
        else if ((locname == "moscow.icbc.com.cn")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e8%8e%ab%e6%96%af%e7%a7%91%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "fs.icbc.com.cn")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%b7%a5%e9%93%b6%e9%87%91%e8%9e%8d%e7%bd%91%e7%ab%99/CN/";
        }
        else if ((locname == "vientiane.icbc.com.cn")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e4%b8%87%e8%b1%a1%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "warsaw.icbc.com.cn")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%8d%8e%e6%b2%99%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "europe.icbc.com.cn")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E5%B7%A5%E9%93%B6%E6%AC%A7%E6%B4%B2%E7%BD%91%E7%AB%99/cn/default.htm";
        }
        else if ((locname == "nz.icbc.com.cn")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%b7%a5%e9%93%b6%e6%96%b0%e8%a5%bf%e5%85%b0%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "pe.icbc.com.cn")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E5%B7%A5%E9%93%B6%E7%A7%98%E9%B2%81%E7%BD%91%E7%AB%99/cn/default.htm";
        }
        else if ((locname == "br.icbc.com.cn")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E5%B7%A5%E9%93%B6%E5%B7%B4%E8%A5%BF/CN/default.htm";
        }
        else if ((locname == "www.icbc.ae")) {
            window.location = "/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e9%98%bf%e5%b8%83%e6%89%8e%e6%af%94%e7%bd%91%e7%ab%99/en/default.htm";
        }
        else if ((locname == "www.icbc.com.es")) {
            window.location = "/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e8%a5%bf%e7%8f%ad%e7%89%99%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "www.icbcparis.fr")) {
            window.location = "/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%b7%b4%e9%bb%8e%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "www.icbc.be")) {
            window.location = "/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%b8%83%e9%b2%81%e5%a1%9e%e5%b0%94%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "www.icbc.co.nl")) {
            window.location = "/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e9%98%bf%e5%a7%86%e6%96%af%e7%89%b9%e4%b8%b9%e7%bd%91%e7%ab%99/en/default.htm";
        }
        else if ((locname == "www.icbc.com.vn")) {
            window.location = "/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e6%b2%b3%e5%86%85%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "www.icbc.com.pk")) {
            window.location = "/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%8d%a1%e6%8b%89%e5%a5%87%e7%bd%91%e7%ab%99/en/default.htm";
        }
        else if ((locname == "icbc.ae")) {
            window.location = "http://abudhabi.icbc.com.cn/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e9%98%bf%e5%b8%83%e6%89%8e%e6%af%94%e7%bd%91%e7%ab%99/en/default.htm";
        }
        else if ((locname == "icbc.com.es")) {
            window.location = "http://spain.icbc.com.cn/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e8%a5%bf%e7%8f%ad%e7%89%99%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "icbcparis.fr")) {
            window.location = "http://paris.icbc.com.cn/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%b7%b4%e9%bb%8e%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "icbc.be")) {
            window.location = "http://brussels.icbc.com.cn/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%b8%83%e9%b2%81%e5%a1%9e%e5%b0%94%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "icbc.co.nl")) {
            window.location = "http://amsterdam.icbc.com.cn/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e9%98%bf%e5%a7%86%e6%96%af%e7%89%b9%e4%b8%b9%e7%bd%91%e7%ab%99/en/default.htm";
        }
        else if ((locname == "icbc.com.vn")) {
            window.location = "http://hanoi.icbc.com.cn/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e6%b2%b3%e5%86%85%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "icbc.com.pk")) {
            window.location = "http://karachi.icbc.com.cn/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%8d%a1%e6%8b%89%e5%a5%87%e7%bd%91%e7%ab%99/en/default.htm";
        }
        else if ((locname == "www.icbcasia.com")) {
            window.location = "/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%b7%a5%e9%93%b6%e4%ba%9a%e6%b4%b2/TC/default.htm";
        }
        else if ((locname == "www.icbci.com.hk")) {
            window.location = "/icbc/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%b7%a5%e9%93%b6%e5%9b%bd%e9%99%85%e7%bd%91%e7%ab%99/sc/default.htm";
        }
        else if ((locname == "www.icbc.com.sg") || (locname == "icbc.com.sg")) {
            window.location = "http://singapore.icbc.com.cn/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e6%96%b0%e5%8a%a0%e5%9d%a1%e7%bd%91%e7%ab%99/cn/default.htm";
        }
        else if ((locname == "www.icbc.com.mm") || (locname == "icbc.com.mm")) {
            window.location = "http://www.icbc.com.mm/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e4%bb%b0%e5%85%89%e7%bd%91%e7%ab%99/en/";
        }
        else if ((locname == "www.icbc.com.mo") || (locname == "icbc.com.mo")) {
                window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E5%B7%A5%E9%93%B6%E6%BE%B3%E9%97%A8/tc/index.htm";
        }
        else if (locname == "nic.xn--estv75g") {
            window.location = "/ICBC/%e5%9f%9f%e5%90%8d%e6%b3%a8%e5%86%8c%e5%b1%80/default.htm";
        }
        else if (locname == "nic.����") {
            window.location = "/ICBC/%e5%9f%9f%e5%90%8d%e6%b3%a8%e5%86%8c%e5%b1%80/default.htm";
        }
        else if (locname == "nic.icbc") {
            window.location = "/ICBC/%e5%9f%9f%e5%90%8d%e6%b3%a8%e5%86%8c%e5%b1%80/default.htm";
        }
        else if (locname == "www.nic.xn--estv75g") {
            window.location = "/ICBC/%e5%9f%9f%e5%90%8d%e6%b3%a8%e5%86%8c%e5%b1%80/default.htm";
        }
        else if (locname == "www.nic.����") {
            window.location = "/ICBC/%e5%9f%9f%e5%90%8d%e6%b3%a8%e5%86%8c%e5%b1%80/default.htm";
        }
        else if (locname == "www.nic.icbc") {
            window.location = "/ICBC/%e5%9f%9f%e5%90%8d%e6%b3%a8%e5%86%8c%e5%b1%80/default.htm";
        }
        else if ((locname == "www.icbc.com.kw") || (locname == "icbc.com.kw")) {
            window.location = "/ICBC/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E7%A7%91%E5%A8%81%E7%89%B9%E7%BD%91%E7%AB%99/en/";
        }
        else if ((locname == "www.icbclondon.com") || (locname == "icbclondon.com")) {
            window.location = "/icbc/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E5%B7%A5%E9%93%B6%E4%BC%A6%E6%95%A6%E7%BD%91%E7%AB%99/en/";
        }
        else if ((locname == "www.icbc.com.mx") || (locname == "icbc.com.mx")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%a2%a8%e8%a5%bf%e5%93%a5%e7%bd%91%e7%ab%99/Espanol/default.htm";
        }
        else if ((locname == "www.icbcthai.com") || (locname == "icbcthai.com")) {
            window.location = "/ICBC/%e6%b5%b7%e5%a4%96%e5%88%86%e8%a1%8c/%e5%b7%a5%e9%93%b6%e6%b3%b0%e5%9b%bd%e7%bd%91%e7%ab%99/th/default.htm";
        }
        else if ((locname == "www.icbk.ca") || (locname == "icbk.ca")) {
            window.location = "/icbc/%E6%B5%B7%E5%A4%96%E5%88%86%E8%A1%8C/%E5%8A%A0%E6%8B%BF%E5%A4%A7%E7%BD%91%E7%AB%99/EN_new";
        }
        else {
            if (is_iPad()) {
                window.location = "/icbc/ipad/default.htm";
            }
            else {
                window.location = "/icbc/";
            }
        }
    </script>
</body>
</html>

请教如何在命令行或者代码中模仿浏览器访问到最终的页面呢。 ?还请大神指教。

回复
阅读 1.8k
2 个回答

这个如果想要实现有点麻烦哦,我们现行方案是使用cli调用PhantomJS

你知道吗?

宣传栏