<?php if ($_GET[hwnd]) { $im=imagegrabwindow($_GET[hwnd]); header("Content-type: image/png"); imagepng($im);} else print"hwnd not given"; ?>