I get a "login failed" error when using UnityWebRequest and WWWForm. I cant connect to ftp server.
I want to connect ftp server and myphp file. after that I will save to mysql database my datas. But log message is "login failed" always.
IEnumerator Gonder()
{
//List form = new List();
WWWForm form = new WWWForm();
form.AddField("kullanici", "kullanici");
form.AddField("bilgi", "bilgi");
UnityWebRequest www = UnityWebRequest.Post("ftp://ethemsite:ethem123@files.000webhost.com/public_html/ali.php", form);
yield return www.SendWebRequest();
if (www.isNetworkError || www.isHttpError)
{
Debug.Log(www.error);
}
else
{
Debug.Log("Form upload complete!");
Debug.Log("WWWForm: " + www.downloadHandler.text);
}
}
↧