代码之家  ›  专栏  ›  技术社区  ›  Althaf

如何使用C从网站读取字符串#

  •  0
  • Althaf  · 技术社区  · 7 年前

    我用过 WebClient

    var client = new WebClient();
    String text = client.DownloadString("http://healthmonitor.epizy.com/getHistory.php?start=20181113100504&ending=20181113103453");
    textBox5.Text = text;
    

    结果是:

    <html><body><script type="text/javascript" src="/aes.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("7a3810cb30970e29869e0e75c85f0a7e");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/"; location.href="http://healthmonitor.epizy.com/getHistory.php?start=20181114200744&ending=20181114200744&i=1";</script><noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript></body></html>
    

    http://healthmonitor.epizy.com/getHistory.php?start=20181113100504&ending=20181113103453

    如果有人能帮我解决这个问题,我将不胜感激。

    提前感谢!

    1 回复  |  直到 7 年前
        1
  •  2
  •   Erik Kalkoken    7 年前

    您将收到此错误,因为该网站正在使用JavaScript。但是您的客户机(即c程序)不像浏览器那样支持JavaScript。

    此网站需要Javascript才能工作,请在中启用Javascript 您的浏览器或使用支持Javascript的浏览器