<?php
/**
@title:PHP5盗链函数
@author:axgle
@filename:referer.php
@contents:This is a demo that show referer made success
http://www.gaodaima.com/46841.htmlPHP5盗链函数(referfile)_php
*/
if($_GET[‘id’]) {
echo $_SERVER[‘HTTP_REFERER’];
} else {
echo referfile(‘http://localhost/referer.php?id=1′,’http://axgle.is.good/’);
}
function referfile($url,$refer=”) {
$opt=array(‘http’=>array(‘header’=>”Referer:$refer”));
$context=stream_context_create($opt);
return file_get_contents($url,false,$context);
}
?>
欢迎大家阅读《PHP5盗链函数(referfile)_php》,跪求各位点评,若觉得好的话请收藏本文,by 搞代码