How to save jQuery object in a cookie?

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

Was this solution helpful to you?

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:

Just Added Q & A:

Find solution

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.