[RD_ValidIP]

Description

Link: [RD_ValidIP]
Author: Rick Draper
Category: Utility
Version: 8.5.x
License: Public Domain
Posted: Aug. 25, 2009
Updated: Jan. 01, 0001
More by this author...

Returns true for a valid IPv4 IP address

Parameters

-ip string, required IP address to test

Sample Usage

[RD_ValidIP('74.125.53.103'] --> TRUE
[RD_ValidIP('202.')] --> FALSE
[RD_ValidIP('74.125.53.256'] --> FALSE
[RD_ValidIP('172.16.0.1'] --> TRUE
						

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[

Define_Tag(
	'ValidIP',
	-Namespace='RD_',
	-Required='ip');
// concept by Bil Cory

    Local('Output') = false;

    Error_Push;
    Protect;
	#Output = client_ipfrominteger(client_iptointeger(#ip)) == #ip; 
    /Protect;
    Return(#Output);
/define_tag;

]

 

Comments

none

Email:


Password:



Newest

Most Popular

Support tagSwap.net