| 发表于:2007-01-16 22:09:0824楼 得分:0 |
兄弟是不是也在搞这个,我最近搞这个天天都在看着,我用的是判断ip段,前三段如果一样在12个小时不能投(datediff函数可以实现),然后在记录ip,获取ip地址的时候不能用那:servervariables( "remote_addr ") 这个别人代码你就没有办法搞了,用一个函数我这里有代码如下,asp功能不行,不能够拿到客户端的mac地址,如果能拿到那就好多了.我这种方法你可以参考看看. function getip() dim stripaddr if request.servervariables( "http_x_forwarded_for ") = " " or instr(request.servervariables( "http_x_forwarded_for "), "unknown ") > 0 then stripaddr = request.servervariables( "remote_addr ") elseif instr(request.servervariables( "http_x_forwarded_for "), ", ") > 0 then stripaddr = mid(request.servervariables( "http_x_forwarded_for "), 1,instr(request.servervariables( "http_x_forwarded_for "), ", ")-1) elseif instr(request.servervariables( "http_x_forwarded_for "), "; ") > 0 then stripaddr = mid(request.servervariables( "http_x_forwarded_for "), 1,instr(request.servervariables( "http_x_forwarded_for "), "; ")-1) else stripaddr = request.servervariables( "http_x_forwarded_for ") end if getip = trim(mid(stripaddr, 1, 30)) end function | | |
|