Just wanted to share what I worked on tonight. Please post any improvements. I am surely not a pro coder or anything. Note that you can use this to share any sketch from Processing over the web (not just webcam video feeds). This method is surely a bit of a bandwidth hog, but it works! If anyone has any recommendations for how to reduce the bandwidth demand that would be helpful.
header('Content-Length: '.strlen( $img )); // How many bytes we're going to send
header('Content-Type: image/jpeg'); // or image/png etc
// actual image
echo $img;
exit();
?>
Extra
Okay Upload.php needs a tweak. What it does, by default, is creates a new unique-named file every time it uploads a new image to the web. This is NOT what we want. We want it to write and replace the same temporary image file (suptemp.jpg), then rename the temporary image file to our permanent image file (sup.jpg). Here are the edits required for Upload.php:
$destinationPath = $destinationDir . 'suptemp.jpg'; //(around line 135)
rename( '/var/www/fuzzywobble/xxx/xxx/xxx/suptemp.jpg', '/var/www/fuzzywobble/xxx/xxx/xxx/sup.jpg' ); //(around line 212, inside else statement)
// '$imageURL;' //(comment this out at the very bottom)