quote:
Originally posted by Mattike
Based on the code from win_crook's reply to Web Services?.
code:
var sUrl = "http://www.hi5.com/friend/login.do";
var sEmail = "EMAIL";
var sPassword = "PASSWORD";
var ajax = new ActiveXObject("Microsoft.XMLHTTP");
ajax.open("POST", sUrl, true);
ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
var sEncodedEmail = encodeURIComponent(sEmail);
var sEncodedPassword = encodeURIComponent(sPassword);
ajax.onreadystatechange = function() {
if(ajax.readyState == 4 && ajax.status == 200) {
Debug.Trace("Success!\nResponse text: "+ajax.responseText);
}
}
ajax.send("email="+sEncodedEmail+"&password="+sEncodedPassword);
Thanks Mattike, going to try it out ^^
Edit: Works like candy, many thanks Mattike