PHP Classes

File: eSCL/Scans/NextDocument/index.php

Recommend this page to a friend!
  Classes of Mark de Leon   PHP Document Scanner using SANE or eSCL AirPrint   eSCL/Scans/NextDocument/index.php   Download  
File: eSCL/Scans/NextDocument/index.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Document Scanner using SANE or eSCL AirPrint
Web interface to scan printed documents
Author: By
Last change:
Date: 4 years ago
Size: 299 bytes
 

Contents

Class file image Download
<?php
$remoteImage
= "/var/www/html/eSCL/Scans/XYZ.jpg";
$ext = pathinfo($remotemage, PATHINFO_EXTENSION);
if (
$ext=='pdf')
{
header("Content-type:application/pdf");
}

else
{
$imginfo = getimagesize($remoteImage);
header("Content-type: {$imginfo['mime']}");
readfile($remoteImage);
}

die();
?>