Delphi/Lazarus: Automatically sign in to an HTTPS page or website
Question by Guest | 2018-08-22 at 23:29
How can I log in to an HTTPS or HTTP website automatically via a Lazarus or Delphi program and then automatically read the content of that page?
What do I need to do this?
Who can help me with some code?
Thank you in advance!
Related Topics
Delphi/Lazarus: How to set up a Link to a Website in an Application
Tutorial | 0 Comments
CSS: Include CSS Stylesheets in HTML
Tutorial | 0 Comments
Create Custom Error Pages for Website
Tip | 0 Comments
Delphi: Global Treatment of Errors (Exceptions)
Tutorial | 0 Comments
Delphi/Lazarus: Command Line Parameter Tutorial Part 1: Sending
Tutorial | 0 Comments
Delphi/Lazarus: 3 Ways to round a Number to X Decimal Places
Tutorial | 7 Comments
Delphi: Multiline Caption for TLabel (at Run Time and Design Time)
Tutorial | 1 Comment
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
Basically, you can proceed in a similar way as when reading the HTML of a website. Since you want to support HTTPS, you need the appropriate SSL libraries. These are ssleay32.dll and libeay32.dll (for a Win 32 program), which should be in the folder of the application.
To simulate the login, you have to imitate the submit process of the login form on the login page. This is usually done through a POST request, which might look something like this:
As values we use name = MyName and password = MyPassword. Here you have to replace "name" and "password" with the correct names of the input fields used in the HTML of the login page. Of course, you also have to set the correct login data instead of MyName and MyPassword to make your login successful.
2018-08-23 at 22:25