using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;
using System.Text.RegularExpressions;
namespace renrenApp
{
class Program
{
static void Main(string[] args)
{
demo_01();
}
static void demo_01()
{
HttpWebRequest request = null;
HttpWebResponse response = null;
string gethost = string.Empty;
CookieContainer cc = new CookieContainer();
Encoding m_Encoding = Encoding.GetEncoding("gb2312");
string Cookiesstr = string.Empty;
try
{
gethost = "http://www.gdgssh.com/api/captcha.png.php?action=image&refresh=0.9102626822699295";
request = (HttpWebRequest)WebRequest.Create(gethost);
request.Method = "GET";
C#验证码下载
最新推荐文章于 2024-04-15 23:25:49 发布
这是一个C#程序示例,用于下载GDGSSH网站的验证码图片。程序通过HttpWebRequest和HttpWebResponse类创建请求,设置请求头包括Cookie和Accept信息,然后将响应的图片流保存到本地文件。
摘要由CSDN通过智能技术生成