This commit is contained in:
fred 2021-08-12 10:49:35 +02:00
parent 03baf6261e
commit 2b2d36e7dc
1 changed files with 3 additions and 6 deletions

View File

@ -10,14 +10,11 @@ if (isset($_REQUEST['phone'])) $phone = $_REQUEST['phone']; else $phone = urldec
$message = "Proposition de ". $phone ." message : ".$link;
//YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d ' ' -f 1);
exec("ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d ' ' -f 1'", $YOU);
$YOU=system("ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d ' ' -f 1'");
print_r($YOU);
$myfile = fopen("/home/fred/astroport/www/newfile.txt", "w") or die("Unable to open file!");
$txt = "John Doe\n";
fwrite($myfile, $txt);
$txt = "Jane Doe\n";
fwrite($myfile, $txt);
$myfile = fopen("/home/".$YOU."/astroport/www/newfile.txt", "w") or die("Unable to open file!");
fwrite($myfile, $message);
fclose($myfile);
error_log("SEND ". $phone ." message : ".$link );