Jump to content

leogg

Member
  • Posts

    1
  • Joined

  • Last visited

About leogg

leogg's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Hi All: I am using C# Application to connect whmcs server,my program code is follow: It return the error 403 when it calling UploadValues。 Please help,thanks。 WebClient WHMCSclient = new WebClient(); string username = "usertest"; string password = EncodeToMD5("lipasswd"); string accessKey = "abcd1234"; // Prepare a Name/Value collection to hold the post values NameValueCollection form = new NameValueCollection(); form.Add("username", username); form.Add("password", password); // the password will still need encoding is MD5 is a requirement form.Add("accesskey", accessKey); form.Add("action", "ValidateLogin"); // action performed by the API:Functions form.Add("responsetype", "xml"); // Post the data and read the response Byte[] responseData = WHMCSclient.UploadValues("http://www.mydomain.com/betaftssweb/includes/api.php", form); // Decode and display the response. //nsole.WriteLine("\nResponse received was \n{0}", string result = System.Text.Encoding.ASCII.GetString(responseData);
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated