-
-
/** - * @著者セラフィム
- * @copyright 2013
- * URL: http:bbs.it-home.org
- */
- $ADMIN = array(
- 'defaulturl'=> 'http://www.xx.com/images/banner -header.gif', //盗链返還地址
- 'url_1' => 'http://www.xx.net/file',
- 'url_2' => net/file1',
- );
- $okaysites = array(
- 'http://box.baidu.com',
- 'http://tieba.baidu.com/p/1493336008', //白名单
- 'http://www.xx. com/1.html'、
- );
- $reffer = $_SERVER['HTTP_REFERER'];
- if ($reffer) {
- $yes = 0;
- while (list($domain, $subarray) = each($okaysites)) {
- if (ereg($subarray, "$reffer")) {
- $yes = 1;
- }
- }
- $theu = 'url_' . $_GET['サイト'];
- $file = $_GET['ファイル'];
- if ($ADMIN[$theu] and $yes == 1) {
- header("場所: $ADMIN[$theu]/$file");
- } else {
- header("場所: $ADMIN[defaulturl]");
- }
- } else {
- header("場所: $ADMIN[defaulturl]");
- }
- print_r($_SERVER['HTTP_REFERER']);
/*
- URL: http://bbs.it-home.org
- */
- ?> p>
-
复制發
|