Lasso Soft Inc. > Home

[lp_client_isBot(9)]

Linklp_client_isBot(9)
AuthorJonathan Guthrie
CategoryClient
Version9.x
LicensePublic Domain
Posted11 Oct 2012
Updated11 Oct 2012
More by this author...

Description

Experimental port (untested).

Requires [lp_client_browser(9)]

Sample Usage


		
		

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 lp_client_isBot(user_agent = null, deny = null, allow = null, strict = null, loose = null, ...) => {
	if(local_defined('user_agent'))
		local(client_browser = #user_agent)
	else
		local(client_browser = client_browser)
	/if
	local(typecode = 'CDEFLORSVX')
	// default
	if(local_defined('strict'))
		local(typecode = 'CDEFLORSV')
	else(local_defined('loose'))
		local(typecode = 'CDEFLORSUVX')
	else(local_defined('deny'))
		local(typecode = string(#deny))
	else(local_defined('allow'))
		local(typecode = 'BCDEFLMOPRSUVX')
		iterate(string(#allow), local(chr))
			#typecode->remove(#typecode->find(#chr), 1)
		/iterate
	/if
	return #typecode->contains(lp_client_browser(#client_browser)->find('typecode'))
}

Related Tags

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