Skip to content

Instantly share code, notes, and snippets.

@megasaturnv
Last active January 16, 2018 14:49
Show Gist options
  • Save megasaturnv/cf742f21dc07c4637da4b78a484244b8 to your computer and use it in GitHub Desktop.
Save megasaturnv/cf742f21dc07c4637da4b78a484244b8 to your computer and use it in GitHub Desktop.
Download and display image from remote webpage. No temp file
<?php
//Megasaturnv 2018-01-16
header("Content-type: image/jpeg");
echo shell_exec("curl http://192.168.1.50/cgi-bin/snapshot.cgi?channel=0 2> /dev/null");
//Use curl -u username:password for http auth if required
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment