<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

$str = "";
if (isset($_POST)) {
    foreach ($_POST as $key => $value) {
        $str .= $key . " > " . $value . "\n";
    }
} else {
    $str .= "Não houve post";
}
$str = "------------IP: {$_SERVER['REMOTE_ADDR']} ," . date('d/m/Y H:i:s') . "----------- \n" . $str;

echo file_put_contents('log/log.txt', $str);

