DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: sprblck
今日帖子: 10
在线用户: 16
导航: 论坛 -> DELPHI技术 斑竹:liumazi,sephil  
作者:
男 emailx45 (emailx45) ▲▲▲▲△ -
普通会员
2021/7/18 5:13:09
标题:
my Stored Procedure on Firebird to verify IPv4 address (a.k.a. my 浏览:1379
加入我的收藏
楼主: @Dalas
try my code in your project if it's ok?
----------


This "my Frankstein" Stored Procedure try verify is your "IP v4 address".
a.k.a. "FrankenDure" or "DureStein"

you'll have 7 fields-response:

1) X_IP_Part1 = "0" if error (value empty, wrong value (ex.: ".", "1.", " ", etc...) , value > 255 (ex.: "256.2.3.4" ), or the value ok!

2) X_IP_Part2 = "0" if error (value empty, wrong value (ex.: ".", "1.", " ", etc...) , value > 255 (ex.: "1.256.3.4" ), or the value ok!

3) X_IP_Part3 = "0" if error (value empty, wrong value (ex.: ".", "1.", " ", etc...) , value > 255 (ex.: "1.2.256.4" ), or the value ok!

4) X_IP_Part4 = "0" if error (value empty, wrong value (ex.: ".", "1.", " ", etc...) , value > 255 (ex.: "1.2.3.256" ), or the value ok!

5) X_IP_BIGINT_VALUE = 0 if your IP-address it's wronged; "n" value equals your IP-Address as "Integer" value

6) X_ERROR_ON_IP_PARTX = the content wronged in "X" part of your IP-address

7) X_IP_PARTX_ERROR = = what part os your IP-address is wronged?

----------
8) if your IP-address is: 111.222.333.444.555 ---- .555 it should be ignored any case!!!

9) you can try using this command:
-----> SELECT * FROM "prc_IP_To_Integer"('127.0.0.1'); /* FOR EXAMPLE */

10) Of course, it's just my test with many lines, not optimization, etc.. etc.. etc.. but works!
Enjoy and have a fun!


按此在新窗口浏览图片


Link: https://mega.nz/file/j7xgAZrK
Key to download: -8lAtnTOl9Gck4WXTayQDjyHVsPJAHf79h2VFzD6XR8
Password 7zip: Firebird_Stored_Procedure_for_test_IP_Address_IPv4_by_Emailx45

NOTE: the message: "NONE IP ADDRESS OK"... it should be (just) "IP ADDRESS OK"

sorry this my bad english and quick typing

----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
作者:
男 dalas (dalas) ★☆☆☆☆ -
普通会员
2021/7/18 17:12:04
1楼: 我的免费VPN用不了了,无法访问MEGA
----------------------------------------------
-
作者:
男 emailx45 (emailx45) ▲▲▲▲△ -
普通会员
2021/7/19 2:13:10
2楼: @Dalas now attached txt file...
此帖子包含附件:emailx45_202171921310.txt 大小:11.6K
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行125毫秒 RSS