Facebook注册机_Facebook账号注册_Csharp代码示例_.Net代码_VS2013
2020-12-13 02:52
标签:facebook注册机 facebook账号注册 csharp代码示例 facebook注册.net代码 【Facebook注册机_Facebook账号注册_Csharp代码示例_.Net代码】 朋友叫了很久帮忙写,无奈今天花时间研究下。。。。 下面只是一个简单示例, 里面我写有一些类,对于写注册机之类的,或许有帮助哟!! ====================================== 注册是成功了,可登录发现跳出手机验证。。。。 部分代码: 使用VS2013编写,源码下载: http://download.csdn.net/detail/envon123/7327619 ========================================================= END Facebook注册机_Facebook账号注册_Csharp代码示例_.Net代码_VS2013,搜素材,soscw.com Facebook注册机_Facebook账号注册_Csharp代码示例_.Net代码_VS2013 标签:facebook注册机 facebook账号注册 csharp代码示例 facebook注册.net代码 原文地址:http://blog.csdn.net/envon123/article/details/25504071using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace Register
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
button1.Enabled = false;
Notify("*********开始**********", 2);
//设置参数
string xing = EnVon.Helper.ChineseHelper.GetXing();
string ming = EnVon.Helper.ChineseHelper.GetMing(2);
string email = Helper.ChineseHelper.GetPinYin(xing + ming).ToLower() + Helper.StringHelper.GetEmailDomain();
string password = EnVon.Helper.StringHelper.RndString(4) + EnVon.Helper.StringHelper.RndString(5, 1);
string birYear = Helper.StringHelper.RndNumberS(1980, 1996);
string birMonth = Helper.StringHelper.RndNumberS(1, 13);
string birDay = Helper.StringHelper.RndNumberS(1, 29);
string retData = string.Empty;
//创建对象
Facebook.Register reg = new Facebook.Register()
{
birthday_day = birDay, //生日日
birthday_month = birMonth, //生日月
birthday_year = birYear, //生日年
firstname = ming, //名字
lastname = xing, //姓
reg_email__ = email, //邮箱
reg_email_confirmation__ = email, //确认邮箱
reg_passwd__ = password //密码
};
//打开注册页
Notify("打开注册页。。。");
int retB = reg.OpenRegPage();
if (retB == 0)
{
Thread.Sleep(200);
Notify("提交注册表单。。。");
//提交注册
retB = reg.PostForm(out retData);
if (retB == 0)
{
Notify("恭喜,注册成功!!");
Notify("-----------------------------");
Notify("姓名:" + xing + ming);
Notify("邮箱:" + email);
Notify("密码:" + password);
Notify("生日:" + birYear + "-" + birMonth + "-" + birDay);
Notify("-----------------------------");
}
else if (retB == 1)
{
Notify("注册失败!");
Notify("失败原因:邮箱已注册过!");
}
else
{
Notify("注册失败!");
Notify("失败原因:" + reg.GetErrMessage(retData));
}
rtxtData.Text = retData;
}
else
{
Notify("打开注册页失败!");
}
Notify("*********完毕**********");
button1.Enabled = true;
}
private void button2_Click(object sender, EventArgs e)
{
}
private void Notify(string str, int mode = 8)
{
if (mode == 8)
{
rtxtMain.Text += DateTime.Now + " " + str + "\r\n";
}
else
{
rtxtMain.Text = DateTime.Now + " " + str + "\r\n";
}
}
private void Form1_Load(object sender, EventArgs e)
{
this.Text = "Facebook账号注册示例";
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Facebook
{
///
上一篇:百度地图api窗口信息自定义
下一篇:排序之希尔排序
文章标题:Facebook注册机_Facebook账号注册_Csharp代码示例_.Net代码_VS2013
文章链接:http://soscw.com/essay/26488.html