Simple PHP receiver for multipart post

Simple PHP receiver for multipart post

This simple receiver may be used with any HTTP server which supports PHP extension.

ff_post.php
  <?php 
  $uploaddir = 'log/';                                                                                                                                                                                                                                                                   
   echo "<pre>\n";                                                                                                                                                                                                                                            
   $uploadfile = $uploaddir . basename($_FILES['event']['name']);                                                                                                                                                                                                                             
   if (move_uploaded_file($_FILES['event']['tmp_name'], $uploadfile)) {                                                                        
        echo "File json uploaded.\n";                                                                                                          
   } else {                                                                                                                                    
        echo "Upload report error!\n";                                                                                                         
   }                                                                                                                                                                                                                                                                                          
   $uploadfile = $uploaddir . basename($_FILES['image']['name']);                                                                                                                                                                                                                             
   if (move_uploaded_file($_FILES['image']['tmp_name'], $uploadfile)) {                                                                        
       echo "File image uploaded.\n";                                                                                                          
   } else {                                                                                                                                    
       echo "Upload image error!\n";                                                                                                           
   }                                                                                                                                                                                                                                                                                          
    echo 'Debug info:\n';                                                                                                                      
    print_r($_FILES);                                                                                                                                                                                                                                                                         
    echo "</pre>\n";                                                                                                                           
?>



    • Related Articles

    • Simple Web form for testing receiver

      ff_post_form.html <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <form method="post" enctype="multipart/form-data" action="ff_post.php"> Enter event file: <input type="file" name="event" size="40"> Enter ...
    • API FF Integration Events \ HTTP Multipart POST

      New Event: This event occurs when a vehicle is detected for the first time. The direction of the vehicle is undefined. Update Event: This event occurs when there is a change in the data package. It can include updates to the recognized license plate, ...
    • php-listener

      Test integrations over HTTP using local standalone WAMP web-server. https://drive.google.com/open?id=1P-s1_J1mh-mSaRqn_A-Y5eD4mM5CgqXI: Online docs: https://github.com/php-listener/blob/master/README.md
    • Post-process logic

      These settings are designed for different scenarios in the camera setup, affecting how the application's recognition engine processes information in the frame. - High Traffic Flow: For scenarios with high traffic flow, we recommend using the default ...
    • FF-Events Configuration

      To send the recognized data to other applications such as VMS (Video Management Systems) or Data Management Systems, you can utilize FF-Events in CAMMRA. Follow these steps to set up event sending: Go to the application's web page and select the ...