[Elphel-support] Setting exposure time via PHP

Oleg support-list at support.elphel.com
Mon Mar 25 18:44:56 PDT 2013


Hi David,

When I load the script on the camera [5], I see that the parameters are
> changed, as PHP tells me, but the image I load after changing the
> exposure time is the same as before (or at least the brightness doesn't
> change), or isn't loaded at all.
>

The problem is that PHP prints the output page once the script is done...
and the browser starts downloading these images after the page is printed -
so it always gets the latest images.

What you can do is:
1. use "flush();" in PHP - I remember it worked a while ago it but couldn't
make it work for the past hour.
2. if you get "flush()" working  you might bump into browser buffering
images - so, for "src"-tag it's better to make up different addresses, e.g.:

> <img src='http://".$_SERVER['HTTP_HOST'].":8081/img?".microtime()."'
> width='200' />


3. Use AJAX calls with JS to load images and run scripts.

Best regards,
Oleg Dzhimiev
Electronics Engineer
phone: +1 801 783 5555 x124
Elphel, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20130325/19745998/attachment-0002.html>


More information about the Support-list mailing list