<?php 
  header('Access-Control-Allow-Headers: Origin, Content-Type, X-Auth-Token');
  header('Access-Control-Allow-Origin: *');
  header('Access-Control-Allow-Methods: GET, POST, HEAD');
  header('Content-Type: image/png; charset=utf-8');
  $file = $_REQUEST['file'];
  if (file_exists($file.'.png')) {
    $img = file_get_contents($file.'.png');
    echo $img;
  }else{
    $img = file_get_contents('NoDataFound.png');
    echo $img;
  }
?>  