Button in HTML to open CMD and ping a certain IP address.

Posted on 2005-05-13
Last Modified: 2012-06-21
Basically it is like this, I have a page that has information on it that was called from a DB. Part of that info was an IP address. I need to be able to open up CMD.exe using a HTML button and pass the "ping" and the ip address to it.

Any ideas on how to accomplish this?

(I tried posting this to the ASP group with no luck)
Question by:cjinsocal581
    LVL 36

    Expert Comment

    Hi cjinsocal581,

    Doubtful you can do it with straight HTML and even Javascript.

    What you can do is ping using a server-side language like ASP. I do not know ASP, but I know you can use the system() function or backticks in PHP, something like:

    `ping [ip address]`

    LVL 13

    Accepted Solution

    LVL 32

    Expert Comment

    I think the solution with be to create a server side scripts that pings the ip address. Then the result of that ping could be outputted from that script back to the browser

    I'm not familiar with ASP, but in PHP I would probably have created a link like this:

    <a href="pingScript.php">Ping server</a>

    and the pingScript.php could be like this:




    I'm sure that ASP have a similar function.

    LVL 6

    Author Comment

    ASP is the way I need to go on this one. Thanks all... You are always the best.
    LVL 32

    Expert Comment

    Wow ! So much activitity a friday night - I didn't see the previous post when I started evaluating this Q.


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
    The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now