D:\host\scoreman.in\highrange2026\images.php

<?php

include('dbconnect.php');
    define('UPLOAD_DIR', 'pimages/');
	
	$databaseQuery = 'SELECT * FROM applications LIMIT 0,10000';
	$result3 = mysqli_query($con,$databaseQuery) or die('Query failed: ' . mysqli_error());
	
	$i=0;
	while($row = mysqli_fetch_array($result3))
  {
	   $appno=trim($row["appno"]);
//	  $photourl=trim($row["photourl"]);
	    $photourl=$row["photourl"];
	    $image_parts = explode(";base64,", $photourl);
    $image_type_aux = explode("image/", $image_parts[0]);
    $image_type = $image_type_aux[1];
    $image_base64 = base64_decode($image_parts[1]);
    $file = UPLOAD_DIR . $appno . '.jpg';
    file_put_contents($file, $image_base64);
	
	//$i++;
	//if($i==100)
//	{
		
	//	break;
		
	//}
	
	
	  
  }
  echo "good";
  
?>