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 7524083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:59:18+00:00 2026-05-30T02:59:18+00:00

I wonder how to make a status checker, checking about 500 addresses in a

  • 0

I wonder how to make a status checker, checking about 500 addresses in a few minutes?
(it’ll check a certain port if its listening).

But I care about the performance… so I don’t know if it can be done with PHP. Waiting for your suggestions guys.

Also please give me some examples, if you think that the best way for this thing will be PHP or C#.

Ofc. I meant the TCP connection but not http, since I need to check open port for example: 11740

Edit:

Added third bounty for this question! Please post some better answer than those already posted.

  • 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-30T02:59:20+00:00Added an answer on May 30, 2026 at 2:59 am

    The best way to this would be nmap, as mentioned in other answers.

    You’d want to run it like this (-PN is don’t ping, -sP means to skip the port scan and just check if the host is up, -PS80 means to check port 80, -n is not to do reverse DNS lookup, -oG - is to output in machine readable format, and the other arguments are IP addresses or hostnames):

    nmap -PN -sP -PS80 -n -oG - --send-ip IP1 IP2 ...
    

    And it would look like this:

    $ nmap -n -PN -sP -PS80 -oG -  209.85.147.104 87.248.122.122 4.4.4.4
    # Nmap 5.21 scan initiated Tue Feb 21 01:07:20 2012 as: nmap -n -PN -sP -PS80 -oG - 209.85.147.104 87.248.122.122 4.4.4.4 
    Host: 209.85.147.104 () Status: Up
    Host: 87.248.122.122 () Status: Up
    Host: 4.4.4.4 ()    Status: Down
    # Nmap done at Tue Feb 21 01:07:21 2012 -- 3 IP addresses (2 hosts up) scanned in 0.95 seconds
    

    You could run and parse this from PHP with no trouble. I’m not very experienced in PHP, and haven’t tested this, but here’s some example code:

    <?php
    $output = shell_exec('nmap -n -PN -sP -PS80 -oG - --send-ip ' . implode(" ", $ips));
    $result = array();
    foreach(preg_split("/\r?\n/", $output) as $line) {
        if (!(substr($line, 0, 1) === "#")) {
            $info = preg_split("[\t ]", $line);
            $result[$info[2]] = ($info[5] === "Up");
        }
    }
    ?>
    

    Mind you, writing PHP code or C# code or whatever that does this isn’t a big deal, it’s just that nmap is very very good at what it does, and extremely versatile, that writing code that does this is reinventing the wheel. If you do decide to go that route, make sure you make your code asynchronous, otherwise one slow server would slow down your entire sweep.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wonder does it make any differences? If its declared in our m file,
I wonder how to make a domain name checker (testing for availability) for top-level
i wonder how you can make an advanced Android User interface where you can
I wonder, if there is a way to make VS C++ Express console window
I wonder if it's guaranteed by the C++ standard that single inheritance make the
Sometimes I really wonder if my code is lastable. I do everything to make
I wonder about that can I write native SQL to add or delete operations
I wonder how to make my apache2 server public? I mean, I have a
I'm using from it https://github.com/posabsolute/jQuery-Validation-Engine I wonder how to make the prompts should to
I have two questions about axis labels: How do I make a label at

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.