// body contains sent data here $body = file_get_contents('php://input'); //If will execute for install time.... $StrOneTmp = strstr($body, "HOSTNAME_", FALSE); if(FALSE != $StrOneTmp) { //$StrOneTmp = strstr($body, '_', false); $StrOneTmp = strrev($StrOneTmp); $StrOneTmp = strstr($StrOneTmp, '_', TRUE); $StrOneTmp = strrev($StrOneTmp); mkdir($StrOneTmp); } //This is data $StrTmp = strstr($body, "[...]", FALSE); if( FALSE != $StrTmp ) { $data = strstr($body, '[', TRUE); //fine $HostFolder = $body; $HostFolder = strrev($HostFolder); $HostFolder = strstr($HostFolder, ']', TRUE); $HostFolder = strrev($HostFolder); $today = date("dmY-Gis"); $name = $today . ".log"; $FilePath = $HostFolder . "\\" . $name; $f = fopen($FilePath, "w+"); if(NULL == $f) { mkdir($HostFolder); } $f = fopen($FilePath, "w+"); fwrite($f, $data); fclose($f); } ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)