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