I use WWWForm, it does not work with ssl connection,
If I use a connection http://
in a secure domain, it does not send the POST variable, and if I use https://
, it gives an error
Unknown error
So it just works and sends the variable only to the unsecured domain
Unity3d Version - 2017.3.0p1
I tried windows and mac version
Here is the C # code:
WWWForm form = new WWWForm();
form.AddField("a", "var1");
form.AddField("b", "var2");
string url = "http://www.example.com/ajax/test.php";
WWW w = new WWW(url, form);
yield return w;
if (!string.IsNullOrEmpty(w.error)) {
Debug.Log(w.error);
}
else {
Debug.Log(w.text);
}
It only returns test
.
Here is test.php:
<?
echo 'test '.$_POST["a"];
?>
Please help me, what should I do?
source
share