Lasso Soft Inc. > Home

[RD_ValidIP]

LinkRD_ValidIP
AuthorRick Draper
CategoryUtility
Version8.5.x
LicensePublic Domain
Posted25 Aug 2009
Updated25 Aug 2009
More by this author...

Description

Returns true for a valid IPv4 IP address

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.

[

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

No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft