hdmasters

view.php

Nov 2nd, 2011
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | None | 0 0
  1. <?php
  2.     $capture = filter_input(INPUT_GET, 'url', FILTER_SANITIZE_URL);
  3.     $browser = new COM("InternetExplorer.Application");
  4.     $handle = $browser->HWND;
  5.     $browser->Visible = true;
  6.     $browser->Fullscreen = true;
  7.     $browser->Navigate("$capture");
  8.     $idImg = rand();
  9.     $img = "snap/iesnap-$idImg.png";
  10.     while($browser->Busy){
  11.         com_message_pump(1000);
  12.     }
  13.    
  14.     $im = imagegrabwindow($handle, 0);
  15.     $browser->Quit();
  16.     imagepng($im, $img);
  17.     imagedestroy($im);
  18.    
  19.     echo "<img src='thumb.php?src=$img&w=500&h=500' width='500' height='500' />";
  20. ?>
  21.  
Advertisement
Add Comment
Please, Sign In to add comment