engelsystem/includes_old/funktion_modem.php

35 lines
664 B
PHP
Raw Normal View History

2011-06-01 12:13:39 +02:00
<?php
include "config_modem.php";
2011-06-01 12:13:39 +02:00
function DialNumber($Number) {
global $Dev, $ModemEnable;
if($ModemEnable) {
echo "Dial number: '<u>$Number</u>' was called<br />\n";
2011-06-01 12:13:39 +02:00
$fp = fopen( $ModemDev, "w");
sleep(1);
fwrite( $fp, "+++");
sleep(1);
fwrite( $fp, "ATZ\n");
sleep(1);
fwrite( $fp, "ATX1\n");
sleep(1);
fwrite( $fp, "ATD $Number \n");
sleep(8);
fclose($fp);
sleep(1);
}
else
echo "Modem is Disable, number: '<u>$Number</u>' was not called<br />\n";
}
function SetWackeup( $Number, $TimeH, $TimeM)
{
2011-06-01 12:13:39 +02:00
global $WakeupNumber;
DialNumber( "$WakeupNumber$TimeH$TimeM$Number");
}
?>