- Home /
Question by
ethemmerdin · Sep 24, 2019 at 02:51 PM ·
webrequestwwwform
I get a "login failed" error when using UnityWebRequest and WWWForm. I cant connect to ftp server,I get a "login failed" error when using UnityWebRequest and WWWForm
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<string> form = new List<str>();
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);
}
}
Comment
Your answer
Follow this Question
Related Questions
Pass Header Data in UnityWebRequest 2 Answers
How do I add a header and a file at the web request at the same time? 0 Answers
Upload files to a remote form using C# in Unity 2 Answers
Handle Blank Response From Web Server 0 Answers
Pass Headers and Arguments in UnityWebRequest POST Method Object 1 Answer