<?php

	// http://192.168.1.70/v2/SMS/B525_send_sms_test_1.php
	// python3 /home/SMS/B525_send_sms.py http://admin:124816aBCDeF@192.168.1.248/ 0761229502 "Hello world"


	$sms_text = "123456 = code de connexion (valable 5mn)" ;
	$sms_phone = "+33761229502" ;

	$cmd = 'sudo python3 /home/SMS/B525_send_sms.py http://admin:124816aBCDeF@192.168.1.248/ ' . $sms_phone . ' "' . $sms_text . '"';
	echo ( $cmd . "</br>\r\n");
	
	$result = exec($cmd, $exec_output, $exec_return);
	
	if ( $exec_return ) {
		echo ("  exec = " . "NOK" . "</br>\r\n");
	}
	else {
		echo ("  exec = " . "OK" . "</br>\r\n");
		echo ("result = " . $result . "</br>\r\n");
		echo ("output = "); print_r($exec_output); echo("</br>\r\n");
	}
	
?>
						
