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

  • SEARCH
  • Home
  • 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 8655441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:01:39+00:00 2026-06-12T15:01:39+00:00

let’s see if yaw can help me out here, Supposing there’s a link: www.example.com/test.html

  • 0

let’s see if yaw can help me out here,

Supposing there’s a link: http://www.example.com/test.html

Upon opening, it would show either 0 or 1.

I need to fetch that value. I.e.:

if internet.value := 0 then ShowMessage('False') else ShowMessage('True');

It could be using indy components or winsockets, how would I go about this one?

  • 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-06-12T15:01:41+00:00Added an answer on June 12, 2026 at 3:01 pm

    If you’re talking about a plain text file containing just an integer value, you can use Indy for this e.g. this way. The following function returns True, when the page downloading succeeded and when the page contains an integer value, False otherwise. Please note, that I wrote it in browser so it’s untested:

    uses
      IdHTTP;
    
    function TryWebContentToInt(const AURL: string; out AValue: Integer): Boolean;
    var
      S: string;
      IdHTTP: TIdHTTP;
    begin
      IdHTTP := TIdHTTP.Create(nil);
      try
        IdHTTP.HandleRedirects := True;
        try
          S := IdHTTP.Get(AURL);
          Result := TryStrToInt(S, AValue);
        except
          Result := False;
        end;       
      finally
        IdHTTP.Free;
      end;
    end;
    

    And the usage:

    procedure TForm1.Button1Click(Sender: TObject);
    var
      I: Integer;
    begin
      if TryWebContentToInt('http://example.com/page.html', I) then
        ShowMessage('Value: ' + IntToStr(I))
      else
        ShowMessage('Page downloading failed or it doesn''t contain an integer value!');
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let me explain best with an example. Say you have node class that can
Let me try to explain by example. Say website is hosted at example.com (NOT
Let say I've this URL: http://example.com/image-title/987654/ I want to insert download to the part
Let's think out of the box! Without any programming skills, how can you say/detect
Let's have an example like below: package xliiv.sandbox; import android.app.Activity; import android.os.Bundle; import android.util.Log;
Let's say I have a table with a Color column. Color can have various
Let's say I can call a method like this: core::get() . What is the
Let's say I have the following text: (example) <table> <tr> <td> <span>col1</span> </td> <td>col2</td>
Let's say there is a graph and some set of functions like: create-node ::
Let's say I'm making a tool to help epicureans keep track of which delicacies

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.