login about faq

hello, everyone.

I'm writing a program in c# winform that automatically logs into livingsocial.com every hour and extracts new deals.

please see that below example code, I'm getting a 404 error code and the below response header. can someone please give me an working example. thank you.

Response Header:
Server: nginx
Date: Sat, 31 Aug 2013 17:34:15 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 728
Connection: keep-alive
Status: 404 Not Found
X-Request-Id: 5c7f8ed2c18b4ba78ba3fbb88e009add
X-Runtime: 0.003467
X-Rack-Cache: invalidate, pass

        Chilkat.Http http = new Chilkat.Http();
        bool unlocked = http.UnlockComponent("Any string begins 30-day trial");
        if (!unlocked)
            MessageBox.Show("Failed to unlock HTTP component");

        Chilkat.HttpRequest req = new Chilkat.HttpRequest();
        req.Path = "/accounts/authenticate";
        req.AddParam("callback_url", "https://login.livingsocial.com/login_callback");
        req.AddParam("email", "someuser@hotmail.com");
        req.AddParam("password", "password");
        req.AddParam("remember_me", "true");

        bool ssl = true;   // Set this to true to use HTTPS
        Chilkat.HttpResponse resp = http.SynchronousRequest("login.livingsocial.com", 443, ssl, req);
        if (resp == null)
            richTextBox1.Text = http.LastErrorText;

        // Did we get a successful response?
        if (resp.StatusCode == 200)
            // Display the HTML source we received.
            richTextBox1.Text = resp.BodyStr;
            // Show the full response header...
            richTextBox1.Text = resp.Header;

asked Aug 31 '13 at 14:00

ahmetegilmez's gravatar image


See this Chilkat blog post: Automating a Website Login using Chilkat HTTP


answered Sep 02 '13 at 11:14

chilkat's gravatar image

chilkat ♦♦

thank you, for that information. I've used a plugin called HttpFox for firefox and monitored the HTTP traffic between the browser and the web servers. I found it was posting to accounts.livingsocial.com not login.livingsocial.com, thanks chilkat know is working.


answered Sep 03 '13 at 15:34

ahmetegilmez's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Aug 31 '13 at 14:00

Seen: 3,490 times

Last updated: Sep 03 '13 at 15:34

powered by OSQA