How to scan a document using PHP - Newbie here!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dream2rule
Forum Contributor
Posts: 109
Joined: Wed Jun 13, 2007 5:07 am

How to scan a document using PHP - Newbie here!

Post 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
arukomp
Forum Contributor
Posts: 113
Joined: Sun Sep 24, 2006 4:22 am

Post by arukomp »

I don't think PHP can do that... PHP was created for website scripting, not for controlling external applications and devices....
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post 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?
dream2rule
Forum Contributor
Posts: 109
Joined: Wed Jun 13, 2007 5:07 am

Post 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
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

I wish you the best of luck with your project and I hope your client is very satisfied.
dream2rule
Forum Contributor
Posts: 109
Joined: Wed Jun 13, 2007 5:07 am

Post by dream2rule »

but the point is im unable to proceed..

any help??
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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.
dream2rule
Forum Contributor
Posts: 109
Joined: Wed Jun 13, 2007 5:07 am

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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.
dream2rule
Forum Contributor
Posts: 109
Joined: Wed Jun 13, 2007 5:07 am

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply