Using libcurl (http://curl.haxx.se/) and OF I’ve written a small application to use HTTP post to upload an image to a webserver. This can be useful, for example, to turn a webcam (using the OF video grabber) into a “live” updated image…a cheap (but slow) alternative to video streaming. I knew this could be done but I did get some help from Daniel Shiffman’s page on the topic - http://www.shiffman.net/2006/05/02/upload/
His .php file was especially useful.
Put this in the tags:
In the tag place this:
<body onload="window.setInterval(refreshImage, 1*1000);">
and then make sure the image has the “id=cam” attribute, or whatever else you want to call it.
My example code can be found here:
In order to use libcurl you need to install it (different depending on your platform) and then link your app with it. In Linux and OSX this can be done with the linker directive “-lcurl”. For Visual Studio I think you just add the library to the “additional libraries” in the Linker section of the project properties…but don’t quote me on this!