rendered paste body<?php// Logfile for prisuppgift_sokmotorposif($messageType == "prisuppgift_sokmotorpos") { $fileName = "_logfiles/post_form_logfile.txt"; $strDate = $now; $strToEmail = $recipient; $strIp = getIp(); $strPostData = ""; foreach($_POST as $postFieldKey => $postFieldValue) $strPostData .= "{" . $postFieldKey . "=" . $postFieldValue . "}"; $newLogEntry = $strDate . ";" . $strToEmail . ";" . $strFromEmail . ";" . $strIP . ";" . $strPostData . ";\n"; if(!is_file($filename)) $newLogEntry = "DATE;TO_EMAIL;FROM_EMAIL;CLIENT_IP;POST_DATA{key=value};\n" . $newLogEntry; $fh = fopen($fileName, "a"); fwrite($fh, $newLogEntry); fclose($fh);}