Jump to content

Istalantar

Members
  • Posts

    3
  • Joined

  • Last visited

About Istalantar

  • Birthday 03/03/1989

Istalantar's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Unfortunatelly if have no own server to switch on and off, but at the moment i am a little inhibited anyway, so I can't try to much, but thank you so far.
  2. Yesterday I ran it via browser (I wanna use the script from anywhere, and maybe let other people use it). After what time would it timeout, when I use it that way? And is there some way to test this script with a connection I can turn on and off?
  3. Hello, I came up with this script to inform me when a certain server is going online. I am not sure if php is the best choice here, so what do you think? <?phpecho "Script started.";$fp1 = fsockopen($ip1, $port1, $errno1, $errstr1, 2);$fp2 = fsockopen($ip2, $port2, $errno2, $errstr2, 2);$fs1_sent = 0;$fs2_sent = 0;while(!$fp1 or !$fp2){echo "Last update".date("H:i:s");if (($fp2 = fsockopen($ip2, $port2, $errno2, $errstr2, 2)) and $fs2_sent == 0) {mail($_POST[mailaddr], $subject1, " ");$fs2_sent = 1;}if (($fp1 = fsockopen($ip1, $port1, $errno1, $errstr1, 2)) and $fs1_sent == 0) {mail($_POST[mailaddr], $subject2, " ");$fs1_sent = 1;}sleep(60);}?>
×
×
  • Create New...