This is just a sample data logger.
Logs into <NodeID>.log $value) { // iterate the headers if($header == 'X-NodeId') { // to find out the Node ID $nodeid = $value; // and save it in $nodeid break; // break loop when found } } if (isset($nodeid)) { // if got node id, use it in the logfile $logfile=$logdir."/node_".$nodeid."_".$datestamp.".log"; } else { // otherwise lets use the IP in the filename $logfile=$logdir."/node_".$_SERVER['REMOTE_ADDR']."_".$datestamp.".log"; } // and save the raw CSV sent by the node, prepended with the timestamp file_put_contents($logfile, $timestamp.$rawdata, FILE_APPEND ); // you could do a lot more things, split the fields, store to a DB, etc. // those things are up to you, as it is just a simple (but working) example // to give you an idea } ?>