Blame view

html/Matrice/commandes_matrice.php 396 Bytes
da5d2b56   lwadbled   feat(Matrice): pe...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  <?php
  	if(isset($_POST['bout'])){
  		$bout = $_POST['bout'];
  		foreach($bout as $value){
  			$aaa = explode(':',$value);
  			$nouveau[$aaa[0]] = $aaa[1];
  		}
  		$texte='';
  		for($a = 1;$a<=25;$a++){
  			if(!isset($nouveau[$a])){
  				$nouveau[$a]=0;
  			}
  		}
  		for($a = 1;$a<=25;$a++){
  			$texte = $texte.$nouveau[$a];
  		}
  		$reponse_rpi = shell_exec("python3 Python/client.py $adresse $texte");
  	}
  ?>