Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6096047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:52:53+00:00 2026-05-23T12:52:53+00:00

I have a problem when i try to get the direct download link using

  • 0

I have a problem when i try to get the direct download link using indy (delphi 2007)

I log into(fileserve.com) with my premium account successfully using this code

procedure TForm1.Button1Click(Sender: TObject);
var
i:integer;
Data, Page : TStringList;
begin
Data := TStringList.Create;
idhttp1.OnRedirect := IdHTTP1Redirect;

idhttp1.AllowCookies := True;
idhttp1.HandleRedirects := True;
idhttp1.ProtocolVersion := pv1_1;
idhttp1.CookieManager := IdCookieManager1;
idhttp1.RedirectMaximum := 15;
idhttp1.Request.UserAgent := 'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.1)';

Data.Add('loginUserName=[user]&loginUserPassword=[pass]&autoLogin=&loginFormSubmit=Login');
IdHTTP1.Post('http://www.fileserve.com/login.php',Data);

idHTTP1.get('http://www.fileserve.com/file/aYkRqp3');

for i := 0 to IdCookieManager1.CookieCollection.Count - 1 do
 form1.Memo2.Lines.Add(IdCookieManager1.CookieCollection.Items[i].CookieText);

end;
procedure TForm1.IdHTTP1Redirect(Sender: TObject; var dest: string;
  var NumRedirect: Integer; var Handled: Boolean; var VMethod: string);
begin
form1.Edit1.Text := dest; //this will show the direct link after "idHTTP1.get" download the hole file
end;

i want to get the direct download link from this link for example fileserve.com/file/aYkRqp3
but code above wil download the file then show the direct link, i don’t want that i want to get the direct link without downloading the file…
fileserve redirect from http://www.fileserve.com/file/aYkRqp3 to a direct link like that
http://fs559dm.fileserve.com/file/aYkRqp3/MAfrTjoMNgfT44D9-2-OTNML/22c855/hex-editor-neo.exe
i want the direct link only how i can do that please and sorry for my english

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:52:54+00:00Added an answer on May 23, 2026 at 12:52 pm

    To avoid downloading on a redirect, you can set TIdHTTP.HandleRedirects to False and Handled to True in the TIdHTTP.OnRedirect event. The redirected URL will be in the TIdHTTP.Response.Location property when TIdHTTP.Get() exits. For example:

    procedure TForm1.Button1Click(Sender: TObject);
    var
      i:integer;
      Data, Page : TStringList;
    begin
      IdHTTP1.OnRedirect := nil;
      IdHTTP1.AllowCookies := True;
      IdHTTP1.HandleRedirects := True;
      IdHTTP1.ProtocolVersion := pv1_1;
      IdHTTP1.CookieManager := IdCookieManager1;
      IdHTTP1.RedirectMaximum := 15;
      IdHTTP1.Request.UserAgent := 'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.1)';
    
      Data := TStringList.Create;
      try
        Data.Add('loginUserName=[user]');
        Data.Add('loginUserPassword=[pass]');
        Data.Add('autoLogin=');
        Data.Add('loginFormSubmit=Login');
        IdHTTP1.Post('http://www.fileserve.com/login.php', Data);
      finally
        Data.Free;
      end;
    
      IdHTTP1.HandleRedirects := False;
      IdHTTP1.OnRedirect := IdHTTP1Redirect;
      IdHTTP1.Get('http://www.fileserve.com/file/aYkRqp3');
    
      Edit1.Text := idHTTP1.Response.Location;
      for i := 0 to IdCookieManager1.CookieCollection.Count - 1 do
        Memo2.Lines.Add(IdCookieManager1.CookieCollection.Items[i].CookieText);
    end;
    
    procedure TForm1.IdHTTP1Redirect(Sender: TObject; var dest: string; var NumRedirect: Integer; var Handled: Boolean; var VMethod: string);
    begin
      Handled := True;
    end; 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Dear Expert i have the following problem when i try to get the value
I have problem when I try insert some data to Informix TEXT column via
I have a very strange problem, when I try to var_dump (or print_r )
I'll try to explain my problem the best I can, here goes: I have
I have been puzzling over a problem this morning with LinqToSQL. I'll try and
I have problem like link text All of my links look like this: htp//site/controller/action/id
let's assume i have some.jpg file. I have a problem when try to do
I frequently have problems dealing with DataRows returned from SqlDataAdapters . When I try
I have problem in some JavaScript that I am writing where the Switch statement
I have problem with return statment >.< I want to store all magazine names

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.