Advertisement
Guest User

incrementa

a guest
Nov 26th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.66 KB | None | 0 0
  1. <?PHP
  2.  
  3. $cont = @$_REQUEST['cont'];
  4. if($cont=='') $cont = 0;
  5. $cont++;
  6. $filename = '/home/massimo/foto/'. $cont .'.png';
  7. echo $filename;
  8. //copy('https://www.facebook.com', $filename);
  9. //Get the file
  10. $content = file_get_contents("http://www.google.co.in/intl/en_com/images/srpr/logo1w.png");
  11. //if ($content == False) echo "no";
  12. //if ($content == Null) echo "null";
  13. //Store in the filesystem.
  14. $fp = fopen($filename, "w");
  15. fwrite($fp, $content);
  16. fclose($fp);
  17. //$content = Null;
  18. echo "<form action='incrementa.php' method='post'>
  19. <input type='hidden' name='cont' value='$cont' />
  20. <button onclick='document.forums[0].submit()'>Snapshot</button>
  21. </form>";
  22.  
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement