Get Internet File Size (HTTP) - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Get Internet File Size (HTTP)


Is it possible in delphi ? if yes , can you post some working code ?.


ThankS

Comments

  • zibadianzibadian Posts: 6,349Member
    [b][red]This message was edited by zibadian at 2006-2-25 1:2:7[/red][/b][hr]
    :
    : Is it possible in delphi ? if yes , can you post some working code ?.
    :
    :
    : ThankS
    :
    Yes:
    [code]
    NMHTTP1.Host := 'www.somesite.com';
    NMHTTP1.Get;
    ShowMessage(Format('Size: %d', [Length(NMHTTP1.Body)+Length(NMHTTP1.Header)]);
    [/code]

    Note: the automatic formatting changes the name of the component used. In the edit box you see the name as I typed it.
  • porodoroporodoro Posts: 230Member
    : [b][red]This message was edited by zibadian at 2006-2-25 1:2:7[/red][/b][hr]
    : :
    : : Is it possible in delphi ? if yes , can you post some working code ?.
    : :
    : :
    : : ThankS
    : :
    : Yes:
    : [code]
    : NMHTTP1.Host := 'www.somesite.com';
    : NMHTTP1.Get;
    : ShowMessage(Format('Size: %d', [Length(NMHTTP1.Body)+Length(NMHTTP1.Header)]);
    : [/code]
    :
    : Note: the automatic formatting changes the name of the component used. In the edit box you see the name as I typed it.
    :
    Whitch component i have to install for this to work?
    Thanks.

  • zibadianzibadian Posts: 6,349Member
    : : [b][red]This message was edited by zibadian at 2006-2-25 1:2:7[/red][/b][hr]
    : : :
    : : : Is it possible in delphi ? if yes , can you post some working code ?.
    : : :
    : : :
    : : : ThankS
    : : :
    : : Yes:
    : : [code]
    : : NMHTTP1.Host := 'www.somesite.com';
    : : NMHTTP1.Get;
    : : ShowMessage(Format('Size: %d', [Length(NMHTTP1.Body)+Length(NMHTTP1.Header)]);
    : : [/code]
    : :
    : : Note: the automatic formatting changes the name of the component used. In the edit box you see the name as I typed it.
    : :
    : Whitch component i have to install for this to work?
    : Thanks.
    :
    :
    This code uses the TNMHTTP component, but you could also use the TidHTTP component.
  • porodoroporodoro Posts: 230Member
    : : : [b][red]This message was edited by zibadian at 2006-2-25 1:2:7[/red][/b][hr]
    : : : :
    : : : : Is it possible in delphi ? if yes , can you post some working code ?.
    : : : :
    : : : :
    : : : : ThankS
    : : : :
    : : : Yes:
    : : : [code]
    : : : NMHTTP1.Host := 'www.somesite.com';
    : : : NMHTTP1.Get;
    : : : ShowMessage(Format('Size: %d', [Length(NMHTTP1.Body)+Length(NMHTTP1.Header)]);
    : : : [/code]
    : : :
    : : : Note: the automatic formatting changes the name of the component used. In the edit box you see the name as I typed it.
    : : :
    : : Whitch component i have to install for this to work?
    : : Thanks.
    : :
    : :
    : This code uses the TNMHTTP component, but you could also use the TidHTTP component.
    :
    I searched the listbox items 1 by 1 , but i cant find the class name.
    Also i've searched on google but i got no results......

  • zibadianzibadian Posts: 6,349Member
    [b][red]This message was edited by zibadian at 2006-2-25 6:56:3[/red][/b][hr]
    : : : : [b][red]This message was edited by zibadian at 2006-2-25 1:2:7[/red][/b][hr]
    : : : : :
    : : : : : Is it possible in delphi ? if yes , can you post some working code ?.
    : : : : :
    : : : : :
    : : : : : ThankS
    : : : : :
    : : : : Yes:
    : : : : [code]
    : : : : NMHTTP1.Host := 'www.somesite.com';
    : : : : NMHTTP1.Get;
    : : : : ShowMessage(Format('Size: %d', [Length(NMHTTP1.Body)+Length(NMHTTP1.Header)]);
    : : : : [/code]
    : : : :
    : : : : Note: the automatic formatting changes the name of the component used. In the edit box you see the name as I typed it.
    : : : :
    : : : Whitch component i have to install for this to work?
    : : : Thanks.
    : : :
    : : :
    : : This code uses the TNMHTTP component, but you could also use the TidHTTP component.
    : :
    : I searched the listbox items 1 by 1 , but i cant find the class name.
    : Also i've searched on google but i got no results......
    :
    :
    TNMHTTP is part of the FastNet components, and TidHTTP of Indy.

    I got 559 hits on TidHTTP using google: http://www.google.nl/search?q=tidhttp

    The first being: How do I use a TIdHTTP with a HTTP Proxy?


  • porodoroporodoro Posts: 230Member
    [b][red]This message was edited by porodoro at 2006-2-25 10:27:2[/red][/b][hr]
    : [b][red]This message was edited by zibadian at 2006-2-25 6:56:3[/red][/b][hr]
    : : : : : [b][red]This message was edited by zibadian at 2006-2-25 1:2:7[/red][/b][hr]
    : : : : : :
    : : : : : : Is it possible in delphi ? if yes , can you post some working code ?.
    : : : : : :
    : : : : : :
    : : : : : : ThankS
    : : : : : :
    : : : : : Yes:
    : : : : : [code]
    : : : : : NMHTTP1.Host := 'www.somesite.com';
    : : : : : NMHTTP1.Get;
    : : : : : ShowMessage(Format('Size: %d', [Length(NMHTTP1.Body)+Length(NMHTTP1.Header)]);
    : : : : : [/code]
    : : : : :
    : : : : : Note: the automatic formatting changes the name of the component used. In the edit box you see the name as I typed it.
    : : : : :
    : : : : Whitch component i have to install for this to work?
    : : : : Thanks.
    : : : :
    : : : :
    : : : This code uses the TNMHTTP component, but you could also use the TidHTTP component.
    : : :
    : : I searched the listbox items 1 by 1 , but i cant find the class name.
    : : Also i've searched on google but i got no results......
    : :
    : :
    : TNMHTTP is part of the FastNet components, and TidHTTP of Indy.
    :
    : I got 559 hits on TidHTTP using google: http://www.google.nl/search?q=tidhttp
    :
    : The first being: How do I use a TIdHTTP with a HTTP Proxy?
    :
    :
    :
    Indy's website(http://www.indyproject.org/) seems to be offline . I will try again later..
    Anyway thanks for your time.



  • porodoroporodoro Posts: 230Member
    [b][red]This message was edited by porodoro at 2006-2-27 8:10:41[/red][/b][hr]
    : [b][red]This message was edited by porodoro at 2006-2-25 10:27:2[/red][/b][hr]
    : : [b][red]This message was edited by zibadian at 2006-2-25 6:56:3[/red][/b][hr]
    : : : : : : [b][red]This message was edited by zibadian at 2006-2-25 1:2:7[/red][/b][hr]
    : : : : : : :
    : : : : : : : Is it possible in delphi ? if yes , can you post some working code ?.
    : : : : : : :
    : : : : : : :
    : : : : : : : ThankS
    : : : : : : :
    : : : : : : Yes:
    : : : : : : [code]
    : : : : : : NMHTTP1.Host := 'www.somesite.com';
    : : : : : : NMHTTP1.Get;
    : : : : : : ShowMessage(Format('Size: %d', [Length(NMHTTP1.Body)+Length(NMHTTP1.Header)]);
    : : : : : : [/code]
    : : : : : :
    : : : : : : Note: the automatic formatting changes the name of the component used. In the edit box you see the name as I typed it.
    : : : : : :
    : : : : : Whitch component i have to install for this to work?
    : : : : : Thanks.
    : : : : :
    : : : : :
    : : : : This code uses the TNMHTTP component, but you could also use the TidHTTP component.
    : : : :
    : : : I searched the listbox items 1 by 1 , but i cant find the class name.
    : : : Also i've searched on google but i got no results......
    : : :
    : : :
    : : TNMHTTP is part of the FastNet components, and TidHTTP of Indy.
    : :
    : : I got 559 hits on TidHTTP using google: http://www.google.nl/search?q=tidhttp
    : :
    : : The first being: How do I use a TIdHTTP with a HTTP Proxy?
    : :
    : :
    : :
    : Indy's website(http://www.indyproject.org/) seems to be offline . I will try again later..
    : Anyway thanks for your time.
    :
    I've installed indy 10 , but when i run the project , the screen freezes and this window pops up :
    [img]http://img516.imageshack.us/img516/8716/ax12pw.jpg[/img]
    i've searched for the file , but cant find it in the installation folder..

    edit : it happens with all objects ! , whats going on ? i used the self installation program to install it..


Sign In or Register to comment.