How to login to a website using delphi?

Hello, I am trying to login to my site CPanel using a delphi program,
Well its a long story, here is the conclusion:
i want program to login to my site cpanel, and click some place to ask the website to make a backup for the site , after that using the same program to download the backup.

its looks hard but here is the details:
i am using TWebbrowser
WebBrowser1.Navigate('http://www.mysite.com:2082');
Will popup a security window ask username and a password,
i want to make my prgram fill the 2 edit with the username and password
and check the Remember my credentials
and last Click on the OK button,  thats it :)
and if its possible we make all this stuff without showing this Window?!
Any help?
function FindWindowByTitle(WindowTitle: string): Hwnd;
var
  NextHandle: Hwnd;
  NextTitle: array[0..260] of char;
begin
  // Get the first window
  NextHandle := GetWindow(Application.Handle, GW_HWNDFIRST);
  while NextHandle > 0 do
  begin
    // retrieve its text
    GetWindowText(NextHandle, NextTitle, 255);
    if Pos(WindowTitle, StrPas(NextTitle)) <> 0 then
    begin
      Result := NextHandle;
      Exit;
    end
    else
      // Get the next window
      NextHandle := GetWindow(NextHandle, GW_HWNDNEXT);
  end;
  Result := 0;
end;

procedure TForm1.Timer2Timer(Sender: TObject);
var
  hIExplorer: HWND;
begin
  hIExplorer := FindWindowByTitle('Windows Security');
  if hIExplorer <> 0 then
  begin
 //   SendMessage(hIExplorer, WM_SYSCOMMAND, SC_CLOSE, 0);
// WHAT I NEED I THINK ITS GOES HERE
 end;
end;

Open in new window

Login-Window.jpg
LVL 3
Snip3rXAsked:
Who is Participating?
 
thiagoblimeiraCommented:
try this:
WebBrowser1.Navigate('http://username:password@www.mysite.com:2082/');
0
 
rotem156Commented:
You're welcome.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.