Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $usgn = ("C:/cs2d/sys/lua/test.lua")
- $url = 'http://www.unrealsoftware.de/profile.php?userid=';
- $saveto = 'C:/cs2d/sys/lua/avatars/';
- function grab_image($url,$saveto){
- $ch = curl_init ($url);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
- $raw=curl_exec($ch);
- curl_close ($ch);
- if(file_exists($saveto)){
- unlink($saveto);
- }
- $fp = fopen($saveto,'x');
- fwrite($fp, $raw);
- fclose($fp);
- curl_setopt($ch,CURLOPT_USERAGENT,'MyImage Collector +http://www.yourdomainname/mybot.html'); or spoof a real one
- 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');
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment