Cheshire Cat Computing

Software support and information
It is currently Thu Jan 17, 2019 12:50 pm

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: multiple IPs with UPDown
PostPosted: Wed Dec 20, 2006 8:22 pm 
Offline
User

Joined: Wed Dec 20, 2006 8:15 pm
Posts: 7
heloo,
I am new and try to use your updown.cgi script in my web, its working fine and showing me image for single IP. I want to try this script to creade images for all my network PCs, please help me if I write IP addresses in a IP.txt file (single IP per line) now I want to create a loop to read an IP from IP.txt file and create UP down status image for it untile IP.txt file end.

Your kind help will be highly appritiable.

Riz. :?: :idea: :?:


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Thu Dec 21, 2006 11:20 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
Sounds as if you'll need to either heavily modify the original updown.cgi to create multiple images, or else write a script to do the looping and generate the page containing the images.
The as-shipped updown.cgi script only does a single host by the passed parameter.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Thu Dec 21, 2006 8:38 pm 
Offline
User

Joined: Wed Dec 20, 2006 8:15 pm
Posts: 7
Thanks for respose
Yes i want to create a script but dont know how can you plzz help me Or create a script for me and all of your friends.

Rizwan.


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Fri Feb 23, 2007 2:57 am 
Offline
User

Joined: Wed Dec 20, 2006 8:15 pm
Posts: 7
At last i am able to full fill my request. and now I have a script with some files (update manually for IP and its description) and a script to reade these files and create a list of images in 3rd file and then it shows me on website.

anyone need this plzz contact me on this fourm.

Rizwan.


Top
 Profile Send private message  
 
PostPosted: Mon Dec 12, 2011 11:02 pm 
Offline
User

Joined: Mon Dec 12, 2011 10:53 pm
Posts: 1
Location: London, UK
Can I just check... are the permission of the updated files automatically modified to 0666 as I have been led to believe and, assuming that is the case, do you have to manually change permissions for security reasons?


Top
 Profile Send private message  
 
PostPosted: Wed Jan 18, 2012 11:03 pm 
Offline
User

Joined: Wed Dec 20, 2006 8:15 pm
Posts: 7
Now I am able to use UPDOWN.CGI script in my .php website, idea is to read ips from my database and use these IPs to create PNG (UP, DOWN) file in a table.
here is my .php file for other peoples.

<?php

$user_name = "root";
$password = "mypassword";
$database = "mydatabase";
$server = "127.0.0.1";
$db_handle = mysql_connect($serve, $user_name, $password);
$db_found = mysql_select_db($database,$db_handle);

if ($db_found) {

$SQL = "SELECT IP FROM mydbtable LIMIT 0, 254";
$result = mysql_query($SQL);

while ($row = mysql_fetch_row($result)) {
foreach($row as $cell) ;

$cgi = "<IMG src=/cgi-bin/updown.cgi?host=".$cell." &mode=icmp>" ;
echo "<table border='1'>
<tr>
<td> .$cell. </td>
<td> .$cgi. </td>
</tr>
</table>";
}
mysql_close($db_handle);
}
else {
print "Database NOT Found ";
}


with the help of this .php file I am able to see which IP of my network is UP and which one is DOWN. all IPs read from mysql database.

Rizwan.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group