5 Replies - 16653 Views - Last Post: 23 January 2010 - 12:59 PM Rate Topic: -----

#1 gibson_junk   User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 95
  • Joined: 24-July 09

How to login to a website C++?

Post icon  Posted 17 January 2010 - 11:41 PM

I need to get a little guidance on how to login to a website and retrieve data from it. I read i could use WinInet but can;t find any good tutorialson how to do this. The website also does not allow login from url
Is This A Good Question/Topic? 1

Replies To: How to login to a website C++?

#2 carltech   User is offline

  • What did you call me?
  • member icon

Reputation: 28
  • View blog
  • Posts: 997
  • Joined: 19-October 07

Re: How to login to a website C++?

Posted 18 January 2010 - 12:45 AM

cURL is one possibility -> http://curl.haxx.se/
it has plenty of documentation
Was This Post Helpful? 0
  • +
  • -

#3 carltech   User is offline

  • What did you call me?
  • member icon

Reputation: 28
  • View blog
  • Posts: 997
  • Joined: 19-October 07

Re: How to login to a website C++?

Posted 18 January 2010 - 12:55 AM

or http://beej.us/guide/bgnet/
it uses winsock if im not mistaken
Was This Post Helpful? 0
  • +
  • -

#4 jeff666   User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 193
  • Joined: 30-December 08

Re: How to login to a website C++?

Posted 19 January 2010 - 10:44 AM

It's easy with WinInet or COM
The code has been posted on Adv. Win32 group (http://tinyurl.com/yjy3ajr)
Was This Post Helpful? 1
  • +
  • -

#5 Splatocaster   User is offline

  • D.I.C Head
  • member icon

Reputation: 51
  • View blog
  • Posts: 182
  • Joined: 22-December 09

Re: How to login to a website C++?

Posted 23 January 2010 - 12:10 PM

If the website uses CGI or PHP, figure out the parameter encoding. Here is an example:
http://www.mywebsite.com/login.cgi?username=blahblahblah&passoword=PASSY



You can use URLDownloadToFile (include Windows.h). This will also save the html of the website returned to a .html file. You can parse the .html file to find any error messages or success.

I've never had to use this function for logging in, however I have used it to grab data from websites. Please let me know if this works.
Was This Post Helpful? 1

#6 gibson_junk   User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 95
  • Joined: 24-July 09

Re: How to login to a website C++?

Posted 23 January 2010 - 12:59 PM

Topic SOLVED
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1