Using https and SSL

I have a very simple script for logging in a user and it works great in http on my stand alone build.
I am about to purchase an SSL certificate and have no experience of working with SSL and https.
What changes would I need to make to the script below in order to work with https?

var phpURL: String = "http://www.mywebsite.com/phpscripts/login.php";
var form = new WWWForm();
form.AddField("username", username);
form.AddField("password", password);
var w = WWW(phpURL, form);
yield w;

1 Answer

1

thank goodness, there is NOTHING you have to do, other than, add the “s”

var phpURL: String = “mywebsite.com is available for purchase - Sedo.com”;

change to:

var phpURL: String = “mywebsite.com is available for purchase - Sedo.com”;

that’s it. Hope it is good news! :slight_smile:

well, NOTHING other than having a website that supports SSL ;)

–

If I understand correctly, this approach will appear to work, but will not enforce that the site has a valid SSL certificate--disappointingly. At least, this appears to be what's happening in my project currently.

–

@bitbutter You are correct, SSL certificates are not checked for validity.

–

New answer [here][1] using HttpWebRequest which supports authentication, and control over accepted certificates. [1]: http://answers.unity3d.com/questions/1226915/post-a-form-over-https.html

–