2005-09-10 19:25:43 +02:00
|
|
|
<?PHP
|
2006-11-29 18:09:25 +01:00
|
|
|
include "./inc/config_modem.php";
|
2005-09-10 19:25:43 +02:00
|
|
|
|
|
|
|
function DialNumber( $Number )
|
|
|
|
{
|
|
|
|
global $Dev, $ModemEnable;
|
|
|
|
|
|
|
|
if( $ModemEnable)
|
|
|
|
{
|
2006-11-29 18:09:25 +01:00
|
|
|
echo "Dial number: '<u>$Number</u>' was called<br>\n";
|
|
|
|
$fp = fopen( $ModemDev, "w");
|
2005-09-10 19:25:43 +02:00
|
|
|
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
|
2006-11-29 18:09:25 +01:00
|
|
|
echo "Modem is Disable, number: '<u>$Number</u>' was not called<br>\n";
|
2005-09-10 19:25:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function SetWackeup( $Number, $TimeH, $TimeM)
|
|
|
|
{
|
|
|
|
global $WackupNumber;
|
|
|
|
DialNumber( "$WackupNumber$TimeH$TimeM$Number");
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|