SHARE
TWEET

Api server

a guest Dec 10th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3.     if(isset($_POST['data'])){
  4.      
  5.         $f = fopen('users/'.date('d-m-Y-H:i:s').'.txt', 'w');
  6.         fwrite($f, $_POST['data']);
  7.        
  8.         if(fclose($f)){
  9.             echo json_encode(['status' => 'success']);
  10.         }else{
  11.            
  12.             echo json_encode(['status' => 'error']);
  13.         }  
  14.     }
  15.  
  16.        
  17.  
  18. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top