根据IP地址自动判断转向分站的代码
Function getIpvalue(clientIP) '得到客户端 的IP转换<strong class="kgb" onmouseover="isShowAds = false;isShowAds2 = false;isShowGg = true;InTextAds_GgLayer="_u6210_u957F";KeyGate_ads.ShowGgAds(this,"_u6210_u957F",event)" style="border-right: 0px; padding-right: 0px; border-top: 0px; padding-left: 0px; font-weight: normal; padding-bottom: 0px; margin: 0px; border-left: 0px; cursor: hand; color: #0000ff; padding-top: 0px; border-bottom: 0px; text-decoration: underline" onclick="javascript:window.open("http://pagead2.googlesyndication.com/pagead/iclk?sa=l&ai=B6PpSnGf-Rou1B4vwtALy1OW3B_LDjRKSz4CwB8CNtwHAuAIQARgBILHzmwkoFDgAUJmWxur6_____wFgnenVgbgFoAH2y-_-A6oBCjIwMDAwMDU0NDWyAQ93d3cua25vd3NreS5jb23IAQHaASJodHRwOi8vd3d3Lmtub3dza3kuY29tLzM0NzEyMy5odG1sgAIBqAMB6AMf6AMy6APXAvUDAgAAAA&num=1&adurl=http://www.yh114.cn/&client=ca-pub-9553494669999741");GgKwClickStat("成长","www.yh114.cn","afc","2000005445");" onmouseout="isShowGg = false;InTextAds_GgLayer="_u6210_u957F"">成长整型,返回值getIpvalueOn Error Resume Next
Dim strIp, array_Ip
strIp=0
array_Ip = Split(clientIP,".")
If UBound(array_Ip)<>3 Then
getIpvalue=0
Exit Function
End If
For i=0 To 3
strIp=strIp+(CInt(array_Ip(i))*(256^(3-i)))
Next
getIpvalue=strIp
If Err Then getIpvalue=0
End Function
clientIP=request.ServerVariables("REMOTE_HOST")
IpValue=getIpvalue(clientIP)
strSql="select top 1 City from [Ipaddress] where "&IpValue&" between Ip1 and Ip2"
Set RsIp=conn.execute(strSql)
If RsIp.bof and RsIp.eof then
UrlCity="未知"
Else
UrlCity=RsIp.Fields.Item("City").Value
End If
if instr(UrlCity,"<strong class="kgb" onmouseover="isShowAds = false;isShowAds2 = false;isShowGg = true;InTextAds_GgLayer="_u5E7F_u5DDE";KeyGate_ads.ShowGgAds(this,"_u5E7F_u5DDE",event)" style="border-right: 0px; padding-right: 0px; border-top: 0px; padding-left: 0px; font-weight: normal; padding-bottom: 0px; margin: 0px; border-left: 0px; cursor: hand; color: #0000ff; padding-top: 0px; border-bottom: 0px; text-decoration: underline" onclick="javascript:window.open("http://pagead2.googlesyndication.com/pagead/iclk?sa=l&ai=B6PpSnGf-Rou1B4vwtALy1OW3B_LDjRKSz4CwB8CNtwHAuAIQARgBILHzmwkoFDgAUJmWxur6_____wFgnenVgbgFoAH2y-_-A6oBCjIwMDAwMDU0NDWyAQ93d3cua25vd3NreS5jb23IAQHaASJodHRwOi8vd3d3Lmtub3dza3kuY29tLzM0NzEyMy5odG1sgAIBqAMB6AMf6AMy6APXAvUDAgAAAA&num=1&adurl=http://www.yh114.cn/&client=ca-pub-9553494669999741");GgKwClickStat("广州","www.yh114.cn","afc","2000005445");" onmouseout="isShowGg = false;InTextAds_GgLayer="_u5E7F_u5DDE"">广州")<>0 then response.Redirect("http://code.knowsky.com")
if instr(UrlCity,"<strong class="kgb" onmouseover="isShowAds = false;isShowAds2 = false;isShowGg = true;InTextAds_GgLayer="_u6DF1_u5733";KeyGate_ads.ShowGgAds(this,"_u6DF1_u5733",event)" style="border-right: 0px; padding-right: 0px; border-top: 0px; padding-left: 0px; font-weight: normal; padding-bottom: 0px; margin: 0px; border-left: 0px; cursor: hand; color: #0000ff; padding-top: 0px; border-bottom: 0px; text-decoration: underline" onclick="javascript:window.open("http://pagead2.googlesyndication.com/pagead/iclk?sa=l&ai=Bbh0knGf-Rou1B4vwtALy1OW3B4uLuieb2MLYA8CNtwGgnAEQAxgDILHzmwkoFDgAUPmekMv5_____wFgnenVgbgFqgEKMjAwMDAwNTQ0NbIBD3d3dy5rbm93c2t5LmNvbcgBAdoBImh0dHA6Ly93d3cua25vd3NreS5jb20vMzQ3MTIzLmh0bWyAAgGoAwHoAx_oAzLoA9cC9QMCAAAA&num=3&adurl=http://www.dmc-edu.com/&client=ca-pub-9553494669999741");GgKwClickStat("深圳","www.dmc-edu.com","afc","2000005445");" onmouseout="isShowGg = false;InTextAds_GgLayer="_u6DF1_u5733"">深圳")<>0 then response.Redirect("http://moban.knowsky.com")
if instr(UrlCity,"<strong class="kgb" onmouseover="isShowAds = false;isShowAds2 = false;isShowGg = true;InTextAds_GgLayer="_u4E0A_u6D77";KeyGate_ads.ShowGgAds(this,"_u4E0A_u6D77",event)" style="border-right: 0px; padding-right: 0px; border-top: 0px; padding-left: 0px; font-weight: normal; padding-bottom: 0px; margin: 0px; border-left: 0px; cursor: hand; color: #0000ff; padding-top: 0px; border-bottom: 0px; text-decoration: underline" onclick="javascript:window.open("http://pagead2.googlesyndication.com/pagead/iclk?sa=l&ai=B6PpSnGf-Rou1B4vwtALy1OW3B_LDjRKSz4CwB8CNtwHAuAIQARgBILHzmwkoFDgAUJmWxur6_____wFgnenVgbgFoAH2y-_-A6oBCjIwMDAwMDU0NDWyAQ93d3cua25vd3NreS5jb23IAQHaASJodHRwOi8vd3d3Lmtub3dza3kuY29tLzM0NzEyMy5odG1sgAIBqAMB6AMf6AMy6APXAvUDAgAAAA&num=1&adurl=http://www.yh114.cn/&client=ca-pub-9553494669999741");GgKwClickStat("上海","www.yh114.cn","afc","2000005445");" onmouseout="isShowGg = false;InTextAds_GgLayer="_u4E0A_u6D77"">上海")<>0 then response.Redirect("http://font.knowsky.com")
由于IP库超过1M,所以上传不了,IP库网上很多 怎么不放个马去算了:ohh: :ohh: *** 作者被禁止或删除 内容自动屏蔽 *** ————————————————————————————
另外本人出售
IP根据城市跳转的程序
演示地址:[url]http://www.xyqb.net/ip2[/url]
购买请联系QQ:712309660(注明IP库)
更新日期:2008年7月5日
本数据库包含最新国内所有省市级IP数据,已删除国外所有IP。<br>
对数据库进行了优化,使查询速度更快更准确。<br>
国外IP以及识别不出的IP情况,城市地区将自动设置为:北京<br>
自动跳转的功能请点[url]http://www.xyqb.net/ip2/index.asp[/url]<br>
———————————————————————————— 挨!我做套来发布吧!闷! IP根据城市跳转的程序 楼上的刘亦菲好丑!@ [quote]原帖由 [i]正版飞云[/i] 于 2008-7-25 08:23 发表 [url=http://www.im286.com/redirect.php?goto=findpost&pid=28022596&ptid=2761783][img]http://www.im286.com/images/common/back.gif[/img][/url]
挨!我做套来发布吧!闷! [/quote]
期待~! [quote]原帖由 [i]正版飞云[/i] 于 2008-7-25 08:23 发表 [url=http://www.im286.com/redirect.php?goto=findpost&pid=28022596&ptid=2761783][img]http://www.im286.com/images/common/back.gif[/img][/url]
挨!我做套来发布吧!闷! [/quote]
期待发布啊!:lol: :lol: 技术呀
页:
[1]
