本帖最后由 hxxhsy 于 2016-4-15 04:01 编辑  
 
使用苏飞助手生成代码,调试时无法正常读取验证码图片 
 
代码:[C#] 纯文本查看 复制代码  private Image byteArrayToImage(byte[] Bytes)
        {
          
            MemoryStream ms = new MemoryStream(Bytes);
            return Bitmap.FromStream(ms, true);
        }[C#] 纯文本查看 复制代码 item = new HttpItem()
            {
                URL = "",//URL     必需项    
                Method = "get",//URL     可选项 默认为Get   
                IsToLower = false,//得到的HTML代码是否转成小写     可选项默认转小写   
                UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)",//用户的浏览器类型,版本,操作系统     可选项有默认值   
                ContentType = "application/x-www-form-urlencoded",//返回类型    可选项有默认值   
                Referer = "",
                ResultType = ResultType.Byte
            };
            HttpResult result = http.GetHtml(item);
            cookie = result.Cookie;
            Image code = byteArrayToImage(result.ResultByte);
           
            
            return code; 
 |