rspadim - 2012-06-01

here is some example in PHP (second code)
http://www.lavrsen.dk/foswiki/bin/view/Motion/MjpegFrameGrabPHP

for jpeg http (only one image) the file starts after first \n\r\n\r (end of http header)
and go to end of socket

for mjpeg http (many images) the file starts after header (\n\r\n\r) and ends at the boundary string give inside of http header... (Content-Type: multipart/mixed; boundary=gc0p4Jq0M2Yt08jU534c0p)

since it´s a jpeg image or mjpeg... i don´t know if \n\r is allowed inside a single jpeg image (i think not...) in this case... image start after \n\r\n\r, and ends at the next \n\r, or if it´s a only jpeg (not mjpeg) it starts at end of file

this help alot to start development of image download using http...
we need only one url
we need extract the host, port, user and password from url
send the get http header to server, and wait response....

i think that´s all, i don´w know if libcurl could help since it make http and ftp really easier.... but for mjpeg i never used libcurl (i don´t know if it allow multipart - mjpeg files)