sqpp15

GetImage

Mar 31st, 2014
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1. <?php
  2.     $usgn = ("C:/cs2d/sys/lua/test.lua")
  3.     $url = 'http://www.unrealsoftware.de/profile.php?userid=';
  4.     $saveto = 'C:/cs2d/sys/lua/avatars/';
  5.     function grab_image($url,$saveto){
  6.     $ch = curl_init ($url);
  7.     curl_setopt($ch, CURLOPT_HEADER, 0);
  8.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  9.     curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
  10.     $raw=curl_exec($ch);
  11.     curl_close ($ch);
  12.     if(file_exists($saveto)){
  13.         unlink($saveto);
  14.     }
  15.     $fp = fopen($saveto,'x');
  16.     fwrite($fp, $raw);
  17.     fclose($fp);
  18.     curl_setopt($ch,CURLOPT_USERAGENT,'MyImage Collector +http://www.yourdomainname/mybot.html'); or spoof a real one
  19.     curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
  20. }
  21.    
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment