Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created March 21, 2018 02:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/9ffeb124877dc8bc2c87db7276ecd091 to your computer and use it in GitHub Desktop.
Save parzibyte/9ffeb124877dc8bc2c87db7276ecd091 to your computer and use it in GitHub Desktop.
<?php
/*
Tomar foto con Python y opencv para después mandarla
a un servidor PHP
@date 20-03-2018
@author parzibyte
@see https://www.parzibyte.me/blog
*/
isset($_POST["foto"]) || exit();
$bytes = file_put_contents(uniqid() . ".png", base64_decode($_POST["foto"]));
echo json_encode($bytes);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment