forked from axiom-team/astroport
16 lines
366 B
PHP
16 lines
366 B
PHP
<?php
|
|
header("Access-Control-Allow-Origin: *");
|
|
if (strlen($_REQUEST['tel']) == 10 ) {
|
|
$newNumber = preg_replace('/^0?/', '+33', $_REQUEST['tel']);
|
|
$data = '"'.$newNumber.'" "'.$_REQUEST['val'].'"'.PHP_EOL;
|
|
$fp = fopen('/tmp/sms.auth.commands', 'w');
|
|
fwrite($fp, $data);
|
|
//sleep(1);
|
|
echo "OK commnand sent! $data";
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
?>
|
|
|