Closed Thread Icon

Topic awaiting preservation: ping from apache Pages that link to <a href="https://ozoneasylum.com/backlink?for=12130" title="Pages that link to Topic awaiting preservation: ping from apache" rel="nofollow" >Topic awaiting preservation: ping from apache\

 
Author Thread
mobrul
Bipolar (III) Inmate

From:
Insane since: Aug 2000

posted posted 03-21-2002 18:51

WAMP

I have a table in my mySQL database that has a bunch of IP addresses.
Every 10 min or so I'd like the server to ping this list of IP addresses to see if they are up or not.
Is this possible with the configuration I have?
Do I need to dive into something a little more powerful, like Java or C or PERL?
Is this a language issue at all?

Basically, I'm not a programmer (though I try real hard). I don't need an exact script or anything like that, just a place to start would be nice. I looked through the Apache documentation and FAQ, but couldn't find anything that seemed to fit what I need.

Any help?
Thanks in advance to all that reply.
mobrul


evilclown01
Nervous Wreck (II) Inmate

From:
Insane since: Dec 2001

posted posted 03-21-2002 19:08

If you are using mySQL are you using php? I think php has a system command function, but it may not be safe to use if you don't check it for tainted data. But if it's just your list of ips, and a visitor can't use the page to change the script(he could if you used global variables or ones not in functions) then I think it would be safe.

evilclown01

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 03-21-2002 19:08

hmmm... im not sure if you can execute ping commands with a server-side-scripting language.

so you gotta write some process/service which will do that for you and that means programming
is the server where this is running on win or linux?

personally i recommend a quick C programm.

mobrul
Bipolar (III) Inmate

From:
Insane since: Aug 2000

posted posted 03-21-2002 19:16

W(indows)
A(pache)
M(ySQL)
P(hp)

Thank you both.

For the first scenario -- that is, using PHP -- can I make apache execute the script automatically...say every 10 min or so, regardless of whether or not a web page is called. I've never used PHP outside an HTML page before...I'd better look into that.

Secondly -- using C -- hmmm...that kinda sucks. No time or desire to learn C. Time to pull in a 'real' programmer I s'pose.

Well, anymore comments are certainly welcome. I'll get back to more research. Always learning more...
Thanks.
mobrul

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 03-21-2002 19:34

hmmm... i heard that CRON-Jobs can do such things. but i never worked with them.
(and im not sure if they are on windows too)

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 03-21-2002 19:37

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

mobrul
Bipolar (III) Inmate

From:
Insane since: Aug 2000

posted posted 03-21-2002 19:48

For those of you interested...
I found this
Time for yet more reading.

Thanks a bundle
to grumble
for his help and support
in my programming fumble!

(sorry, I couldn't think of anything that even remotely comes close to rhyming with 'evilclown01'...but thanks to you too!)

<edit>Thanks to Ini too! (don't want to leave you out) I have (or can get) any rights I may need for the server. That is no problem at all. A lot of learning this project has turned out to be....indeed. I'm sure I'll be back with yet another question.</edit>

enough of my awful poetry...back to programming.
mobrul

[This message has been edited by mobrul (edited 03-21-2002).]

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 03-21-2002 20:13

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

mobrul
Bipolar (III) Inmate

From:
Insane since: Aug 2000

posted posted 03-21-2002 20:48

Please, no disrespect intended...
As far as programming goes, I'm but a fetus in the womb of the technically inept.

I respect ALL the advice given here. I have never before heard of 'cron jobs' or the php exec() function...though I have every intention of learning everything I can about them.
Please remember that I just installed PHP about 1 week ago. That's all. No other programmng before that. What I am attempting is at the very edge of my experiences.
If my posts sounded disrespectful or aloof in any manner I offer my complete and humble apologies.

No need to 'prove' anything, really. When I said in my first post that I just needed a 'place to start' I was absolutely tellng the truth. I want to work, struggle, learn...I really do.

I now have a place to begin my research and my complete appreciation goes out to InI, Grumble, and evilclown01 (even if I can't think of anything that rhymes with his name!)

mobrul


InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 03-21-2002 20:52

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

mobrul
Bipolar (III) Inmate

From:
Insane since: Aug 2000

posted posted 03-21-2002 20:58

cool

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 03-21-2002 22:41

Yeah the exec or system command just basically drops you into your shell and runs commands as if you were at a terminal window. (How this works on Win2K is another issue but give it a try). Note that Windows ping is different from Linux ping (it only sends 4 by default). you may want to look at the scheduled tasks in progs>>accessories>>System Tools to see if this will work for you instead of cron.



.:[ The Tao of Steve ]:.
Be Desireless
Be Excellent
Be Gone
...................................

« BackwardsOnwards »

Show Forum Drop Down Menu