The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Networking (http://hintsforums.macworld.com/forumdisplay.php?f=14)
-   -   Perl / PHP Script to Ping (http://hintsforums.macworld.com/showthread.php?t=16954)

ulrichm 11-06-2003 02:30 AM

nkuvu: Your script only works for IPs in the 192.168.1.x subnet. Anything outside, I just tried my IP, do result in packet loss. Furthermore, you might want to limit the entry to 1<x<254. Because 255 is the broadcast address and can find comps on your network, which you might want outsiders not too see. Just my 2€ct.

nkuvu 11-06-2003 11:02 AM

I ran into that oddity once, and couldn't reproduce it.

The results from a ping just a minute ago:
Quote:

PING google.com (216.239.37.99): 56 data bytes
64 bytes from 216.239.37.99: icmp_seq=0 ttl=52 time=94.843 ms

--- google.com ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 94.843/94.843/94.843 ms
But the 254 limit is a good idea, thanks. I'll be working on this off and on, so don't be surprised if the script is broken when you try. :)

nkuvu 05-03-2004 09:00 AM

Quote:

Originally Posted by nkuvu
Note that I've done a little cleanup, so the links are as follows...

For those of you still following the old links (and I know there are a few, because I've seen the 404 responses in my logs) I've made some adjustments. Of course if you read this far down into the thread you'll have the correct links already from the post I just quoted. So this is more to show off how nifty Apache is.

I added Redirect directives to my httpd.conf file, as follows:
Code:

Redirect permanent /foo.txt http://nkuvu.homeip.net/ping_testing/foo.txt
Redirect permanent /ping_test.cgi http://nkuvu.homeip.net/ping_testing/ping_test.cgi
Redirect permanent /ping_test.php http://nkuvu.homeip.net/ping_testing/ping_test.php
Redirect permanent /ping_table.php http://nkuvu.homeip.net/ping_testing/ping_table.php

So if you attempt to access the file http://nkuvu.homeip.net/foo.txt what you actually get is http://nkuvu.homeip.net/ping_testing/foo.txt without any errors or complaints. You'll still get a 404 for the ones that are no longer in cgi-bin, but that's because they're not there. Wanna see how these scripts work? Put 'em on your own machine and run them there. :P

But I am surprised that people are still looking at this thread for such simple scripts...

nkuvu 05-18-2005 07:07 PM

Jiminy. Freakin. Crickets.

OK, so this thread is pretty old. It's been dead for two years. And yet I am still getting requests for these scripts. But I've since changed my Apache configuration a bit, so now the cgi files that I had in the ping_testing directory were being 403'ed. So all of the links to the cgi source files redirect to txt files instead. Same result as before, different extension.

If you follow a link to a CGI executable file (as in, the link points to my cgi-bin directory) you get redirected to the source. As I mentioned last year: Wanna see how these scripts work? Put 'em on your own machine and run them there. :P

As I've mentioned on my website, if you have questions or problems with these scripts, please let me know. The only reason I know about the 403 errors was due to examination of my web logs. If you're following a link that gives you a 403 or 404, let me know. I still have these files, but they may have moved.


All times are GMT -5. The time now is 08:59 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.