Link | server_type |
Author | Jason Huck |
Category | Utility |
Version | 8.x |
License | http://opensource.org/licenses/artistic-license.php |
Posted | 18 Nov 2006 |
Updated | 05 Feb 2007 |
More by this author... |
Returns the type of web server as reported in the HTTP response header.
[server_type] -> 'Apache/1.3.33 (Darwin) PHP/5.1.2 JRun/4.0'
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( 'type', -namespace='server_', -priority='replace', -description='Returns the type of web server as reported in the HTTP response header.' ); null( include_url( 'http' + (server_port == 443 ? 's') + '://127.0.0.1' + ((: 80, 443) !>> server_port ? ':' + server_port) + '/robots.txt', -retrievemimeheaders='__temp_header' ) ); // reset any web server errors from the include_url above // that may have bubbled up into a Lasso error error_code = 0; error_msg = 'No error'; protect; local('out') = $__temp_header->find('Server')->first->second; handle_error; local('out') = 'undefined'; /handle_error; /protect; var_remove('__temp_header'); return(#out); /define_tag;
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft