×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Gábor Papp
Added: Feb 2, 2017 3:49 PM
Views: 2221
Tags: no tags
  1. <?php
  2. header('Content-Type: text/plain; charset=utf-8');
  3.  
  4. $uzenet='';
  5. $uzenet.='Időpont: '.date('Y-m-d_H-i-s')."\n\n";
  6. $uzenet.='IP cím: '.$_SERVER['REMOTE_ADDR']."\n\n";
  7. $uzenet.='Text: '.$_POST['textdata'];
  8.  
  9. $file = fopen('text-'.date('Y-m-d_H-i-s').'.txt',"w");
  10. // echo fwrite($file,$uzenet);
  11. fwrite($file,$uzenet);
  12. fclose($file);
  13.  
  14. // opcios e-mail ertesites, nem minden szerveren megy
  15. $mailtext = "Teszteles lefutott: jellyone - 1";
  16. mail("suni@swgy.hu","Teszteles lefutott: jellyone - 1",$mailtext);
  17.  
  18. echo 'OK';
  19. // unlink('teszt.php');
  20. // unlink('teszt-out.php');
  21. ?>