- <?php
- $rand = rand(0, 3);
- if (strstr($_SERVER['HTTP_REFERER'], 'baidu'))
- {
- $url = $rand . '.jpg';
- }
- else
- {
- $array = array('http://baidu.com', 'http://g.cn', 'http://daigou.in', 'http://cctv.com');
- $url = $array[$rand];
- }
- header('Location: ' . $url);
- exit;
- ?>
复制代码 随机图。随机链接。已测试通过。 |