+3  A: 

You should take some time to learn how the whole HTTP thing works, because sometimes it is more complex than what it looks. A browser does a lot more than simply issuing HTTP GET or POST request with a URL, and getting back some HTML. For example they store a lot of informations about visited sites, because the HTTP headers carry a lot of useful informations. How they do it is usually browsers specific, and not system-wide. Other browser or applications may be not able to see or use them. You have to set up the HTTP headers properly for a given site, and handle situations like authentication. Sites with authentication can use broad range of techniques to allow access, from simple login pages to HTTP authentication methods. They can redirect you to pages that handle authentication, and although it can happen trasparently for an already logged user, a browser (or an application) will see what's happening and must handle that.

ldsandon
Thanks for the reply. I will look into it.
Douglas
You can use tools like Wireshark or Fiddler to see what is exchanged actually.
ldsandon
+1  A: 

That is because Indy only does the transport for you.

Indy does not do the login; the website does.
There are dozens of ways a website can do a login.
Most of those logins require the support of a web-browser.

So you most likely need to simulate what a web-browser does.
That includes supporting all technologies that the web-site uses for the login.
That might include Cookies, extra HTTP headers, HTML 5, JavaScript, Flash or other features.

Be prepared for a lot of work...

--jeroen

Jeroen Pluimers
I see and thanks for the replies everyone. I just assumed that I would need to tap into the IdCookieManager component somehow (never used it so that why I was asking) but I see there is alot to it then that. I will look into it but in the meantime I guess I will just hack something together using the TWebBrowser component (not efficient or pretty by any means but it's easy)
Douglas