选择DST!支持DST!

查看完整版本: 谁帮我测试下...

cwk32 2007-5-13 14:10

谁帮我测试下...

需要上传论坛LOGO到images/imgad.gif

代码:

[code]<?php
define('CURSCRIPT', 'seccode');

require_once './include/common.inc.php';

if(preg_replace("/https?:\/\/([^\:\/]+).*/i", "\\1", $_SERVER['HTTP_REFERER']) == preg_replace("/([^\:]+).*/", "\\1", $_SERVER['HTTP_HOST'])) {
        readfile("images/imgad.gif");
        exit();
}

if($discuz_uid==0){
        readfile("images/imgad.gif");
        exit();
}

if(!$_COOKIE && !$_SERVER["HTTP_USER_AGENT"]){
        readfile("images/imgad.gif");
        exit();
}

if(!empty($uid)) {
        $uid = intval($uid);
}
if($creditspolicy['promotion_visit']) {
        if($uid) {
                $db->query("REPLACE INTO {$tablepre}promotions (ip, uid, username) VALUES ('$onlineip', '$uid', 'imgphp')");
        }
}

if($creditspolicy['promotion_register']) {
        if($uid) {
                dsetcookie('promotion', ($_DCOOKIE['promotion'] = $uid), 30);
        }
}

readfile("images/imgad.gif");
exit();
?>[/code]

放到根目录

用来扩展推广功能

大家以XXX.php?uid=1的方式访问看看(先清除Cookies),然后再注册一个,看看uid为1的帐户的贡献值有没有增加就行了..

lee 2007-5-13 15:14

没PHP环境

cwk32 2007-5-13 15:35

我也是..

asd1 2007-5-13 20:36

使用免费网页服务吧。。。 :)

cwk32 2007-5-14 13:24

我不想同时装DZ...

lee 2007-5-14 13:24

;P 你本地装个好了

cwk32 2007-5-14 17:09

这太难了...

lee 2007-5-14 17:32

:L 鼠标点点就OK了

cwk32 2007-5-14 20:45

...........

asd1 2007-5-14 20:47

回复 #8 lee 的帖子

呵呵,果然是高手。。。 ;P

cwk32 2007-5-15 13:28

:'( ...哭..

asd1 2007-5-15 22:03

冒汗。。。 :L
页: [1]
查看完整版本: 谁帮我测试下...