
<?php

include '../config.php';

if($__testMode==true)
{
	echo "tes mode;";
	return false;
}
else
{
	if($_POST['upload64'])
	{
		
		$baseStr=str_replace("data:image/png;base64,","",$_POST['upload64']);
			
			$six_digit_random_number = mt_rand(100000, 999999); ;
			$filePath = "userdata/temp/". $six_digit_random_number .".png";
			
			file_put_contents( $filePath, base64_decode($baseStr));
			
			echo  $six_digit_random_number;
		
	}	
}


?>