astroport/www/LOVELand/zen_loveland_entrance.php

17 lines
423 B
PHP
Raw Normal View History

2020-05-13 13:04:49 +02:00
<?php
header("Access-Control-Allow-Origin: *");
if (strlen($_REQUEST['num']) == 10 ) {
// Replace leading 0 with +33
$newNumber = preg_replace('/^0?/', '+33', $_REQUEST['num']);
// HASH NUMBER
$HASH=hash('sha256', $newNumber);
// CREATE FILE for POST TREATMENT with sms_ASTROPORT.sh
$fp = fopen('/tmp/loveland_entrance/'.$HASH, 'a');
fwrite($fp, $newNumber);
return true;
} else {
return false;
}
?>