Unity3d based on mobile phone serial number and two-dimensional code to do genuine verification

Source: Internet
Author: User

public class Litjsonweb:monobehaviour
{
public static Litjsonweb LJ;
public string Str_code, Str_ieme, Str_requst, jsonstr;
public string Info;
void Start ()
{
LJ = this;
Str_ieme = systeminfo.deviceuniqueidentifier;//Get phone string number
}
void Update ()
{
Easycodescannerexample other = Gameobject.find ("Main Camera"). Getcomponent<easycodescannerexample> ();
Str_code = other.datastr;//get QR code
Jsondata date = new Jsondata ();
date["Code" = Str_code;
date["IMEI"] = Str_ieme;//json conversion format
Jsonstr = date. ToJson ();
}
public void Post_ ()
{
Startcoroutine (post ());
}
IEnumerator Post ()
{
String url = "*****************";//Get Server interface address
byte[] post_date;//byte stream array
String Str_post;
Wwwform WwF = new Wwwform ();
Wwf.addfield ("code", Str_code);
Wwf.addfield ("IMEI", str_ieme);
www getData = new www (url, wwF);
Yield return getData;
if (getdata.error! = null)
{
Str_requst = GetData.error.ToString ();
yield return null;
}
Else
{
This.str_requst = getdata.text;//accepts parameters returned by the server side
}
}
}

Unity3d based on mobile phone serial number and two-dimensional code to do genuine verification

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.