omarh2005 Posted January 5, 2010 Share Posted January 5, 2010 Hi for all; Is there a way or code that can take a picture of the scanner to the site immediately, rather than on the browse the picture Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/187272-code-to-take-photo-from-scanner-immediately/ Share on other sites More sharing options...
premiso Posted January 5, 2010 Share Posted January 5, 2010 If you have a local server, you can possibly use curl (not sure how they do on file upload forms) and use glob with copy and unlink to basically do this: Scan images to a local folder "new_scanned" use Windows Tasks or a CRON job on Linux to run a local script on your local PHP server. You open the directory of the new_scanned images (using glob) read the file to the script then use that to construct POST data to the remote page form and send it that way using curl. Once it is completed, copy the image (if you want to) to an "old_scanned" directory and then unlink the image inside of the "new_scanned" directory. Unsure if that is what you were after, but is about the only I could see doing it with PHP. That is if curl can send files to scripts I am not sure on that part. Quote Link to comment https://forums.phpfreaks.com/topic/187272-code-to-take-photo-from-scanner-immediately/#findComment-988946 Share on other sites More sharing options...
omarh2005 Posted January 5, 2010 Author Share Posted January 5, 2010 Thank you premiso But I need to give order to the scanner to take a picture instead of browsing photo Quote Link to comment https://forums.phpfreaks.com/topic/187272-code-to-take-photo-from-scanner-immediately/#findComment-988958 Share on other sites More sharing options...
premiso Posted January 5, 2010 Share Posted January 5, 2010 How are you using the term scanner? Are you referring to the piece of hardware that scans in photos or are you referring to "Scanning" over a webpage and downloading the photos that way? Quote Link to comment https://forums.phpfreaks.com/topic/187272-code-to-take-photo-from-scanner-immediately/#findComment-989000 Share on other sites More sharing options...
omarh2005 Posted January 6, 2010 Author Share Posted January 6, 2010 I'm referring to scanner device (hardware) Quote Link to comment https://forums.phpfreaks.com/topic/187272-code-to-take-photo-from-scanner-immediately/#findComment-989728 Share on other sites More sharing options...
premiso Posted January 6, 2010 Share Posted January 6, 2010 You would have to have software on the computer that allows a commandline interface to send the commands to the scanner. This will also require the scanner drivers. As far as how to do that, I have no clue. You will have to look up how to utilize scanners by a command line interface on the operating system you are using. This is not possible with PHP alone. Quote Link to comment https://forums.phpfreaks.com/topic/187272-code-to-take-photo-from-scanner-immediately/#findComment-989759 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.