0

We already have a well-established web based application that runs on php and mysql. Recently, we thought of moving it to desktop application because we need the application to access newly bought scanners. we need to take scan of documents and associate them their respective data/record.

before it is moved to desktop application, is there a possiblity that PHP could access the scanner, take snap shot and save the pictures in JPG or PNG format? can it even communicate with any hard ware at all?

already programmed classes would be appreciated.

5
Contributors
6
Replies
7
Views
6 Years
Discussion Span
Last Post by crazycat503
0

Hello you wrote “moving it to desktop application” that can’t mean anything else as a read it than that your server – localhost will be in your desk. There is no real deference if it where in the most distant place on earth or in your desk. If you want to create a trigger or daemon that will start a scanner attached to a server then you should know the shel command to start the job and of course use PHP to call it (shell_exec() or exec() and more … )

In my point of view, each programming language has a purpose, as I would never advise using Java Swing to built a simple Windows calculator that you could do with VB in 2 minutes (although you can), there is not need also to use PHP for things that it is not in its nature , although you can.

0

I would take this advice Quoting here for you:

Unless you're willing to go knee deep into some C/C++ code, you're probably going to want to find some executable that performs the scan for you, and dumps the result into some kind of image file format that you understand.

Once you've figured all that out, try calling it from the command line, and reading back the dumped image.

0

And a question for you: Where is the scanner? If at user's machine then you have no choice, AFAIK, than code desktop app,. Since PHP is SSL!

0

have a look at scanimage: http://www.sane-project.org/man/scanimage.1.html. You could probably access via PHP as well, but I'm not sure. I imagine the scanner be connected directly to the host (also via LAN to access a device on the local machine => see manpage) and with a web interface you could view the images.

But I've to agree with all posters before: PHP is maybe the very worst choice for that kind.

0

hi,

thanks for your reply. i understand PHP's limitation and it is why we considered building a new desktop application that still would use the computer we are using as localhost. the server would be connected to the localhost since it is an intranet application.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.