转化ip地址为长整型数字

来源:互联网 发布:a星算法原理 编辑:程序博客网 时间:2024/04/26 05:10
<script type="text/javascript"><!--google_ad_client = "pub-4490194096475053";/* 内容页,300x250,第一屏 */google_ad_slot = "3685991503";google_ad_width = 300;google_ad_height = 250;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
  1. <
  2. Function CLngIP(ByVal asNewIP) 
  3. Dim lnResults 
  4. Dim lnIndex 
  5. Dim lnIpAry 
  6. lnIpAry = Split(asNewIP, ".", 4) 
  7. For lnIndex = 0 To 3 
  8. If Not lnIndex = 3 Then 
  9. lnIpAry(lnIndex) = lnIpAry(lnIndex) * (256 ^ (3 - lnIndex)) 
  10. End If 
  11. lnResultslnResults = lnResults + lnIpAry(lnIndex) 
  12. Next 
  13. CLngIP = lnResults 
  14. End Function 
  15. %> 
<script type="text/javascript"><!--google_ad_client = "pub-4490194096475053";/* 728x90, 创建于 08-12-8 */google_ad_slot = "0403648181";google_ad_width = 728;google_ad_height = 90;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击