Home News Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Avatars

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > Internet Discussion

ping script required
Reply
 
Thread Tools
Old 07-11-2003, 22:36   #1
handyman
Permanently Banned
 
Join Date: Jun 2003
Location: Nr Carnforth
Age: 50
Services: M6 Keele
Posts: 5,462
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
Send a message via MSN to handyman
ping script required

Is there such a thing as a script I can run on a web page that will automatically run a ping test to a ip (either manually entered or capured auto).

Basically I am trying to get as many tools into my site as possible to enable people to try diagnose faults with out having to call in to tech support.

Thanks in advance
mark
handyman is offline   Reply With Quote
Advertisement
Old 07-11-2003, 22:59   #2
Bifta
Inactive
 
Join Date: Jul 2003
Location: Eglinton, Co. Derry
Posts: 7,640
Bifta has a nice shiny starBifta has a nice shiny star
Bifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny star
Re: ping script required

Quote:
Originally Posted by handyman
Is there such a thing as a script I can run on a web page that will automatically run a ping test to a ip (either manually entered or capured auto).

Basically I am trying to get as many tools into my site as possible to enable people to try diagnose faults with out having to call in to tech support.

Thanks in advance
mark
Try this (PHP) (taken from worldsend)

Code:
<?php

$max_count = 10; 
$unix      =  1;  
$windows   =  0; 

$register_globals = (bool) ini_get('register_gobals');
$system = ini_get('system');
$unix = (bool) $unix;
$win  = (bool)  $windows;
//
If ($register_globals)
{
   $ip = getenv(REMOTE_ADDR);
   $self = $PHP_SELF;
} 
else 
{
   $submit = $_GET['submit'];
   $count  = $_GET['count'];
   $host   = $_GET['host'];
   $ip     = $_SERVER['REMOTE_ADDR'];
   $self   = $_SERVER['PHP_SELF'];
};

If ($submit == "Ping!") 
{

   If ($count > $max_count) 
   {
      echo 'Maximum for count is: '.$max_count;
      echo '<a href="'.$self.'">Back</a>';
   }
   else 
   {

      $host= preg_replace ("/[^A-Za-z0-9.]/","",$host);
      echo '<body bgcolor="#FFFFFF" text="#000000"></body>';
      echo("Ping Output:<br>"); 
      echo '<pre>';           

      if ($unix) 
      {
         system ("ping -c$count -w$count $host");
         system("killall ping");
      }
      else
      {
         system("ping -n $count $host");
      }
      echo '</pre>';
    }
} 
else 
{
    echo '<body bgcolor="#FFFFFF" text="#000000"></body>';
    echo '<p><font size="2">Your IP is: '.$ip.'</font></p>';
    echo '<form methode="post" action="'.$self.'">';
    echo '   Enter IP or Host <input type="text" name="host" value="'.$ip.'"></input>';
    echo '   Enter Count <input type="text" name="count" size="2" value="4"></input>';
    echo '   <input type="submit" name="submit" value="Ping!"></input>';
    echo '</form>';
    echo '<br><b>'.$system.'</b>';
    echo '</body></html>';
}
?>
Bifta is offline   Reply With Quote
Old 07-11-2003, 23:02   #3
willie
Inactive
 
willie's Avatar
 
Join Date: Jun 2003
Location: Ra Port
Age: 72
Services: VM 200mb VM Phone M
Posts: 566
willie is just so famous around these partswillie is just so famous around these partswillie is just so famous around these partswillie is just so famous around these partswillie is just so famous around these partswillie is just so famous around these partswillie is just so famous around these partswillie is just so famous around these partswillie is just so famous around these partswillie is just so famous around these partswillie is just so famous around these partswillie is just so famous around these partswillie is just so famous around these partswillie is just so famous around these partswillie is just so famous around these parts
Send a message via MSN to willie
Re: ping script required

Some scripts that may help http://www.theworldsend.net/
willie is offline   Reply With Quote
Old 07-11-2003, 23:03   #4
homealone
Guest
 
Posts: n/a
Re: ping script required

Quote:
Originally Posted by handyman
Is there such a thing as a script I can run on a web page that will automatically run a ping test to a ip (either manually entered or capured auto).

Basically I am trying to get as many tools into my site as possible to enable people to try diagnose faults with out having to call in to tech support.

Thanks in advance
mark
dunno - but the site is looking really good
  Reply With Quote
Old 07-11-2003, 23:28   #5
handyman
Permanently Banned
 
Join Date: Jun 2003
Location: Nr Carnforth
Age: 50
Services: M6 Keele
Posts: 5,462
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
Send a message via MSN to handyman
Re: ping script required

cheers guys that looks just what I am after.

and fanks gaz, ur tin should have been posted yesterday by bops gf
handyman is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:35.


Server: osmium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum