日期:2014-05-17 浏览次数:20562 次
<?php function getImage($url,$filename="",$ext) { if(!$url) return false; $filename=date("dMYHis").$ext; ob_start(); readfile($url); $img = ob_get_contents(); ob_end_clean(); $fp2=@fopen($filename, "a"); fwrite($fp2,$img); fclose($fp2); return $filename; } $link=$_GET['url']; $ext=$_GET['ext']; $img=getImage("$link","","$ext"); if($img) echo "<p>".$img."</p><br><a href=".$img.">Enter</a>"; else echo "false<br />url<br />ext<br />"; ?>