Little script

TarinC

New Member
Messages
698
Reaction score
0
Points
0
http checker

EDIT: Source Removed!

EDIT: The script is supposed to check if http is running(Requires Cron, Not important here though), if it isnt running, a counter is created on the file offline.txt. If the counter hits 5 it emails the user. If the number is bigger than 5, offline.txt auto resets.

EDIT: The script posted above is correct! It works fine
 
Last edited:

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
darn...i'm sorry if only i was good in PHP, i could probably find the error in a second but i don't fully understand it..sorry

edit-i'm just guessing but maybe cuz you never defined 'online'
 
Last edited:

Chris S

Retired
Messages
2,055
Reaction score
1
Points
38
well can you describe what happens when you run the script. as i can't run it because you have made functions that i don't have to help test it with

also what does this script do. i think i have a general idea but...
 
Last edited:

TarinC

New Member
Messages
698
Reaction score
0
Points
0
Sorry.. i added the wrong function. i edited the first post to include the new code and what its supposed to do.
 
Last edited:

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
wouldn't this just be easier if you basically said..."check this page, if it's not up then say http is offline"?
 

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
oh ya...i guess that is a good idea, but i though bryon or corey would be creating it lol oh well...that's ok umm well it could still do that, just check a site that's up a lot, i could volunteer my site (http://cgz09.com) to be the site it checks so we could still do my idea though, right, and still get emailed somehow?
 

TarinC

New Member
Messages
698
Reaction score
0
Points
0
A friend helped me out on the source. i edited the first post with the new source. it works! thanks for helping!
 

TarinC

New Member
Messages
698
Reaction score
0
Points
0
yes i can, why?

Do you want to be notified when http goes down?
 
Last edited:
Top