I have a problem in php.
Since curl is bugged in my web host, and your fsockmethod returns and fsock error so I used my own fsock class where I can use something like
addpostdata(array('USER, 'PASSSWORD'), array(urlencode($username), urlencde($password)))
And I'm sure it works but the response I keep getting "Invalid USER or PASSWORD"