<?php $etat = $_POST["HttpData"]; if($etat != "") { $fp = fopen("status_alarm.txt","w"); ftruncate($fp, 0); fputs($fp,$etat); fclose($fp); } ?>