Bluetom

#php盗图记

#php盗图记

摔,搞了一个多小时也没搞出来,单个$url传值,可以下载下载

for循环,foreach都未果,图片都出现object not found。

考试完再吧

<!--?php <br ?--> function get_file($url,$folder,$pic_name){
set_time_limit(24*60*60); //限制最大的执行时间
$destination_folder=$folder?$folder.'/':''; //文件下载保存目录
$newfname=$destination_folder.$pic_name;//文件PATH
$file=fopen($url,'rb');

if($file){
$newf=fopen($newfname,'wb');
if($newf){
while(!feof($file)){
fwrite($newf,fread($file,1024*8),1024*8);
}
}
if($file){
fclose($file);
}
if($newf){
fclose($newf);
}
}
}
for($i=11901101,$j=0;$i<=11901141;$i++,$j++){ $now=substr($i,-2); if($now==41) {$i=$i+60;} $url[$j]="http://jxgl.hdu.edu.cn/readimagexs.aspx?xh=".$i."&lb=xsdzzcxx"; $file[]=$i.".jpg"; } foreach ($url as $a) { get_file($a,"all","1.jpg"); } ?>

Bluetom

作为挨踢业的前段湿 搬过砖也画过画:爱看、爱听、爱玩儿、爱折腾、爱打撸啊撸、intj

Proudly published with Hexo