How can you save an image taken from a webcam with PHP & jQuery?
-
How can I have a webcam interface and have someone take a picture and have that picture saved in a directory with PHP/jQuery?
-
Answer:
You can't get access to the webcam using either jQuery or PHP. You'll need to use something like Flash or Silverlight. Once you have the image data you can easily save it by posting it to a PHP script using code like this: $img = $GLOBALS["HTTP_RAW_POST_DATA"];header('Content-Type: image/jpeg');header("Content-Disposition: attachment; filename=image.jpg);file_put_contents('image.jpg', $img); If you need more help, feel free to email me. I have some code and a Flash component that might help.
Josh Fraser at Quora Visit the source
Other answers
PHP and jQuery do not have access to the cam. I'm not sure if this is changing with any HTML specs though. Currently, the best way to capture an image from a webcam is with Flash. There is an API for it. Last time I did it though I had to base64 encode the image and send it to a server side script to decode and save.
Brennan Cheung
Cincopa gallery plugin is used to upload video directly from webcam to website. I am not sure if it works for image also. http://www.cincopa.com/media-platform/services/create-photo-gallery
Megan Wetzler
I got image data as base64 encoding type. In order to upload it on server, i need to save image on client's storage firstly ? Regards.
Pyodro Song
Related Q & A:
- How can I save my computer desktop's background as an image/pic?Best solution by Yahoo! Answers
- How can I save money on a London trip?Best solution by international.fsu.edu
- How can I save a copy of my printed docs on my computer?Best solution by Yahoo! Answers
- How can I use my digital camera as a webcam?Best solution by Yahoo! Answers
- How can I save attached email photos to a desktop folder?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.