Page 1 of 1
How to scan a document using PHP - Newbie here!
Posted: Wed Jun 13, 2007 6:19 am
by dream2rule
Hello All,
I would like to know how to scan a document plugged to the visitor computer.
In this regard, the script should be able to detect the scanner on clients PC, scan a document and move it to a specific folder on to the web directory.
Can anyone help me out with this??
Regards,
Noob
Posted: Wed Jun 13, 2007 6:33 am
by arukomp
I don't think PHP can do that... PHP was created for website scripting, not for controlling external applications and devices....
Posted: Wed Jun 13, 2007 7:09 am
by feyd
PHP can interface with hardware on the server. It generally cannot interface with much on the requesting client. Scanners are rarely networked. It's even rarer still when they are to have them allowed to receive remote requests.
You will need help from an external source that will be loaded on the user's system such as Java.
Posted: Wed Jun 13, 2007 10:18 am
by Ollie Saunders
You can use the scripting language of the OS in question to automate the uploading of the file once scanned. Gotta be easier than Java.
Are we talking about Windows here?
Posted: Wed Jun 13, 2007 11:45 pm
by dream2rule
Cant we know the physical existence of a scanner using PHP?
If the scanner exists then i need to move the selected files which are to be scanned by the user in a specific directory!
Can we do this using PHP??
This is my project and i need to complete it very soon. would be very glad if anyone ca provide me with a source code for this!
Thanks & Regards,
A PHP Noob
Posted: Thu Jun 14, 2007 12:02 am
by Benjamin
I wish you the best of luck with your project and I hope your client is very satisfied.
Posted: Thu Jun 14, 2007 12:26 am
by dream2rule
but the point is im unable to proceed..
any help??
Posted: Thu Jun 14, 2007 4:55 am
by volka
feyd wrote:You will need help from an external source that will be loaded on the user's system such as Java.
On a win32 client that might be a small program that uses the TWAIN interface to get data from the scanner. On other systems you need something else.
Posted: Wed Jun 27, 2007 7:36 am
by dream2rule
hey volka, i have been going through the wikipedia for TWAIN
http://en.wikipedia.org/wiki/TWAIN
Is PHP coding possible for this??
I use a Win32 environment.
Awaiting Reply..
Thanks
dream2rule
Posted: Wed Jun 27, 2007 7:42 am
by volka
You want to use the scanner plugged to the client's computer.
php is not executed on the client's computer but on the webserver (of course each client of yours can install php and run a script, but I guess that's not the point).
No, you can't use php to do what you want.
Posted: Wed Jun 27, 2007 7:49 am
by dream2rule
I am really sorry to trouble you this way Volka...
But the point is that i have been assigned a project where in i need to upload multiple files.
When the user clicks on the browse button, this browse button must open an option for either scanning a document from the Scanner connected to the clients PC or to browse a file and upload.
And the project needs to be submitted tomorrow.
Sorry again and thanks for all the help.
Regards,
Dream2rule
Posted: Wed Jun 27, 2007 7:52 am
by feyd
PHP, without any doubt, can't do what you want. We've said that over and over now. You need something external to PHP to do it.