用php隐藏图片的真实地址

1     <?
2 $image_path="images/"
3 $image_file=$image_path.$_GET['name'];
4 $sTmpVar = fread(fopen($image_file, 'r'), filesize($image_path));
5 header("Content-type: image/* ");
6 echo $sTmpVar;
7 ?>

这段代码不光可以隐藏图片,代码后三行不用改,连FLASH真实地址也可以隐藏.

用这个结合其它技术可以防止盗链.

posted @ 2011-12-15 18:48  imcode  阅读(1210)  评论(0编辑  收藏  举报