QQ第三方网站登录后台代码演示

本文展示了使用C#实现QQ第三方登录的后台代码,包括获取验证码、登录验证和登录过程,详细解释了关键步骤和函数用法。
摘要由CSDN通过智能技术生成
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using System.Net;
using System.IO;
using System.Security.Cryptography;
using System.Text.RegularExpressions;
using System.Collections;



namespace webqq
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            
        

        }
         public String host = "http://d.web2.qq.com";        public String shost = "http://s.web2.qq.com";
        private Random rd = new Random();
        private String get = "get";
        private CookieContainer cookies = new CookieContainer();
        private String refer = "http://d.web2.qq.com/proxy.html?v=20110331002&callback=2";
        private String userAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E)";
        private String accept = "*/*";
        private String contentType = "application/x-www-form-urlencoded; charset=UTF-8";
        private String verifyCode = "";
        private String hex16 = "";
        
        private String ptwebqq = "";
        private String psessionid = "";
        private String vfwebqq = "";
        private String skey = "";
        private String clientid =new Random().Next(100000000)+"";
       
        //默认需要输入验证码
        private Boolean isVerify = false;

        private void txt_pass_Click(object sender, EventArgs e)
        {
           
        }
        private String getHtml(String url,String method,String data)
        {

            Uri uri = new Uri(url);
            HttpWebRequest request = (HttpW
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值