- header: documentation ( source)
- fpassthru: documentation ( source)
- fopen: documentation ( source)
- filesize: documentation ( source)
<?php
$name = '/proc/self/mem';
$fp = fopen($name, 'rb');
// send the right headers
header("Content-Type: image/png");
header("Content-Length: " . filesize($name));
// dump the picture and stop the script
fpassthru($fp);
exit;