asp.net现在还不能在Linux上运行,要不用asp.net的WebRequest做这个简直易如反掌,要说难就是分析其中的数据。

解决方案 »

  1.   

    use HttpWebRequest/HttpWebResponse in System.Net namespace to retrieve the page and then use System.Text.RegularExpressions.Regex class to parse the textRetrieving HTTP content in .NET
    http://www.west-wind.com/presentations/dotnetWebRequest/dotnetWebRequest.htm
      

  2.   

    呵呵,对不起,在LINUX上用Perl写个脚本就行了, :-)
      

  3.   

    saucer(思归, MS .NET MVP)
    谢谢您长期以来对我帮助,但是我水平是太差,你给了我提示,我还是不知道怎么做的!
    您能说的详细点吗?
      

  4.   

    用web service,html模式匹配,返回xml文挡,在linux下读出即可!
    (还需要模仿html表单发送)----  我也在做,一同研究!
    [email protected]
      

  5.   

    use LWP::Simple;$s = get("http://weather.sina.com.cn/");print "城市 天气状况 风向风力 最低温度 天气状况 风向风力 最高温度\n";while ($s =~ /<tr[^>]+>\s*<td>([^<]+)<\/td>\s*<td>([^<]+)<\/td>\s*<td>([^<]+)<\/td>\s*<td>([^<]+)<\/td>\s*<td>([^<]+)<\/td>\s*<td>([^<]+)<\/td>\s*<td>([^<]+)<\/td>\s*<\/tr>/mg)
    {
       print "$1 $2 $3 $4 $5 $6 $7\n";
    }