Home > Backend Development > PHP Tutorial > php如何隐藏图片的真实地址_PHP

php如何隐藏图片的真实地址_PHP

WBOY
Release: 2016-06-01 12:34:50
Original
1291 people have browsed it

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

这段代码不光可以隐藏图片,代码后三行不用改,连FLASH真实地址也可以隐藏.
用这个结合其它技术可以防止盗链.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template