日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > php >内容正文

php

打码平台php源码,打码平台 远程打码 实例源码

發布時間:2023/12/15 php 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 打码平台php源码,打码平台 远程打码 实例源码 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

【實例簡介】C# 遠程打碼 實例項目源碼

【實例截圖】

【核心代碼】

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

using System.IO;

using System.Drawing.Imaging;

using System.Threading;

using System.Diagnostics;

namespace UUWiseCSWrapper

{

public partial class Form1 : Form

{

static int SoftID = 0;

static string SoftKey = "";

//static UUWiseHelperLib.CaptchaRecognizerClass c = new UUWiseHelperLib.CaptchaRecognizerClass();

public Form1()

{

InitializeComponent();

}

///

/// 登陸測試

///

///

///

private void btnLogin_Click(object sender, EventArgs e)

{

if (!CheckSid())

return;

string u = tbxUsername.Text.Trim();

string p = tbxPasswd.Text.Trim();

int res = Wrapper.uu_login(u, p);

rtbLoginResult.Text = res.ToString();

}

///

/// 識別測試

///

///

///

private void btnSltCodeImg_Click(object sender, EventArgs e)

{

if (!CheckSid())

return;

using (OpenFileDialog dlg = new OpenFileDialog())

{

dlg.Title = "選擇驗證碼圖片";

dlg.Filter = "圖片文件 (*.jpg)|*.jpg|所有文件 (*.*)|*.*";

if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)

{

tbxCodeImgPath.Text = dlg.FileName;

if (radioButton2.Checked)

{

StringBuilder result = new StringBuilder();

int codeId = Wrapper.uu_recognizeByCodeTypeAndPath(dlg.FileName, 1, result);

lblCaptcha.Text = "codeId:" codeId.ToString() ", result:" result.ToString();

}

else if (radioButton3.Checked)

{

Image img = Image.FromFile(dlg.FileName);

MemoryStream ms = new MemoryStream();

img.Save(ms, ImageFormat.Jpeg);

byte[] buffer = new byte[ms.Length];

ms.Position = 0;

ms.Read(buffer, 0, buffer.Length);

ms.Flush();

StringBuilder res = new StringBuilder();

int codeId = Wrapper.uu_recognizeByCodeTypeAndBytes(buffer, buffer.Length, 1, res);

lblCaptcha.Text = "result:" res.ToString() ", codeId:" codeId.ToString();

ms.Close();

ms.Dispose();

img.Dispose();

}

}

}

}

bool CheckSid()

{

if (SoftID <= 0)

{

MessageBox.Show("請先設置軟件id");

return false;

}

if (string.IsNullOrEmpty(SoftKey))

{

MessageBox.Show("請先設置軟件key");

return false;

}

return true;

}

private void btnSetSoftInfo_Click(object sender, EventArgs e)

{

try

{

SoftID = int.Parse(txtSoftID.Text);

SoftKey = txtSoftKey.Text;

}

catch

{

MessageBox.Show("無效的軟件id");

return;

}

Wrapper.uu_setSoftInfo(SoftID, SoftKey);

}

private void btnGetScore_Click(object sender, EventArgs e)

{

int score = Wrapper.uu_getScore(tbxUsername.Text, tbxPasswd.Text);

rtbLoginResult.Text = score.ToString();

}

private void btnUserReg_Click(object sender, EventArgs e)

{

string userName = tbxUsername.Text;

string pass = tbxPasswd.Text;

if (string.IsNullOrEmpty(userName))

{

MessageBox.Show("用戶名不能為空");

return;

}

if (string.IsNullOrEmpty(pass))

{

MessageBox.Show("對不起,請輸入密碼");

return;

}

if (string.IsNullOrEmpty(txtSoftID.Text))

{

MessageBox.Show("請輸入軟件id");

return;

}

if (string.IsNullOrEmpty(txtSoftKey.Text))

{

MessageBox.Show("請輸入軟件key");

return;

}

int sid = int.Parse(txtSoftID.Text);

string key = txtSoftKey.Text;

int result = Wrapper.uu_reguser(userName, pass, sid, key);

MessageBox.Show("返回結果:" result.ToString());

}

private void btnPay_Click(object sender, EventArgs e)

{

string cardNum = txtCardNum.Text;

string userName = txtPayUserName.Text;

if (string.IsNullOrEmpty(cardNum))

{

MessageBox.Show("充值卡不能為空");

return;

}

if (string.IsNullOrEmpty(userName))

{

MessageBox.Show("對不起,請輸入要充值的用戶");

return;

}

if (string.IsNullOrEmpty(txtSoftID.Text))

{

MessageBox.Show("請輸入軟件id");

return;

}

if (string.IsNullOrEmpty(txtSoftKey.Text))

{

MessageBox.Show("請輸入軟件key");

return;

}

int sid = int.Parse(txtSoftID.Text);

string key = txtSoftKey.Text;

int result = Wrapper.uu_pay(userName, cardNum, sid, key);

MessageBox.Show("返回結果:" result.ToString());

}

private void button1_Click(object sender, EventArgs e)

{

using (FolderBrowserDialog dlg = new FolderBrowserDialog())

{

if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)

{

DirectoryInfo dir = new DirectoryInfo(dlg.SelectedPath);

richTextBox1.BeginInvoke(new EventHandler(delegate

{

richTextBox1.Text = string.Format("當前路徑:{0}\r\n", dir.FullName);

}));

tbxImgPath.Text = dlg.SelectedPath;

}

}

}

void ThreadsTest(object param)

{

object[] parameter = (object[])param;

DirectoryInfo dir = new DirectoryInfo(parameter[0].ToString());

while (true)

{

foreach (FileInfo file in dir.GetFiles())

{

if (file.Extension.ToLower() == ".jpg")

{

Thread t = new Thread(new ThreadStart(delegate

{

StringBuilder result = new StringBuilder();

int codeId = Wrapper.uu_recognizeByCodeTypeAndPath(file.FullName, 1, result);

richTextBox1.BeginInvoke(new EventHandler(delegate

{

SetLabelText(label11);

string text = string.Format("識別ID:{0}, 返回結果:{1}", codeId.ToString(), result);

richTextBox1.Text = text;

richTextBox1.Select(richTextBox1.Text.Length - text.Length, text.Length);

richTextBox1.SelectionColor = Color.Black;

richTextBox1.Text = "\r\n";

richTextBox1.Select(richTextBox1.TextLength, 0);

richTextBox1.ScrollToCaret();

}));

}));

t.IsBackground = true;

t.Start();

}

Thread.Sleep(50);

}

Thread.Sleep(1000 * 60 * 2);

}

}

private void button2_Click(object sender, EventArgs e)

{

Thread t = new Thread(new ParameterizedThreadStart(ThreadsTest));

t.IsBackground = true;

t.Start(new object[] { tbxImgPath.Text });

}

void DelegateSetRtbText(string text)

{

this.richTextBox1.BeginInvoke(new EventHandler(delegate {

richTextBox1.Text = text "\r\n";

richTextBox1.Select(0, richTextBox1.TextLength);

richTextBox1.ScrollToCaret();

}));

}

void SetLabelText(Label lbl)

{

lbl.Invoke(new EventHandler(delegate {

lbl.Text = (int.Parse(lbl.Text) 1).ToString();

}));

}

}

}

總結

以上是生活随笔為你收集整理的打码平台php源码,打码平台 远程打码 实例源码的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。