Tcl API Reference
Table of Contents
I.
Updated/Validated Commands
ns_accesslog
— Work with the access log
ns_addrbyhost
— Return the IP address of a hostname
ns_adp_mimetype
— Get or set the mime type of the ADP page
ns_adp_registeradp
— Register an ADP tag which is an ADP
ns_after
— Schedules a script to run after a given number of seconds
ns_cancel
— Cancel a previously scheduled procedure
II.
Unvalidated Commands - Help me Update These!
env
— Manipulate environment variables
ns_adp_abort
— Stop processing of ADP and throw away all output
ns_adp_argc
— Return number of ADP arguments
ns_adp_argv
— Return the value of an ADP argument
ns_adp_bind_args
— Bind ADP arguments to names
ns_adp_break
— Stop processing of ADP and flush all output
ns_adp_debug
— Connect to TclPro debugger
ns_adp_dir
— Return directory where ADP resides
ns_adp_dump
— Return ADP output buffer
ns_adp_eval
— Evaluate ADP
ns_adp_exception
— Return ADP exception state
ns_adp_include
— Parse an ADP file and include in page
ns_adp_parse
— Process an ADP file or string and return the result as a string
ns_adp_puts
— Write string or Tcl command output to page
ns_adp_registertag
— Register an ADP tag
ns_adp_return
— Stop processing of ADP and flush all output
ns_adp_stream
— Begin ADP streaming
ns_adp_tell
— Return bytes in ADP output buffer
ns_adp_trunc
— Clear ADP output buffer
ns_atclose
— Register a script to be executed when the current connection closes
ns_atexit
— Register a script to be run at server shutdown
ns_atshutdown
— Register a script to be run at server shutdown
ns_atsignal
— Register a script to be run in response to a SIGHUP signal
ns_cache_flush
— Remove cache entry
ns_cache_names
— Return cache names
ns_cache_size
— Return size of cache
ns_cache_stats
— Return cache statistics
ns_checkurl
— Authorize a request
ns_chmod
— Change a file's access permissions
ns_cond
— Manage events
ns_config
— Extract information from the configuration file
ns_configsection
— Return values of a configuration file section
ns_configsections
— Return values of all configuration file sections
ns_conn
— Find information about the current HTTP connection.
ns_conncptofp
— Write content to a file
ns_connsendfp
— Write contents of file to conn
ns_cp
— Copy one file to another
ns_cpfp
— Copy a specified number of bytes from one file to another
ns_cport
— Control port interface commands
ns_critsec
— Manage critical sections
ns_crypt
— Encrypt password
ns_db
— Access the AOLserver database
ns_dbconfigpath
— Get nsdb section name
ns_dberror
— Return SQL error information
ns_dbformvalue
— Retrieve the value of a column specified by form data
ns_dbformvalueput
— Set default values in an HTML form for accessing the database
ns_dbquotename
— Surround a name by double quotes if it contains a space
ns_dbquotevalue
— Prepare a value string for inclusion in an SQL statement
ns_deleterow
— Delete row in specified table corresponding to form data
ns_eval
— Evaluate Tcl
ns_event
— Manage events
ns_ext
— Perform external database driver operations
ns_findrowbyid
— Return row corresponding to specified key/value pairs
ns_fmttime
— Return a formatted date and time
ns_ftruncate
— Truncate an open file to a specified length
ns_get_multipart_formdata
— Handle the POST action of a form containing one Netscape file widget
ns_getcsv
— Read CSV data from a file
ns_getform
— Return an ns_set that contains all of the query data that was part of the HTTP request
ns_geturl
— Fetch a URL
ns_gifsize
— Determine the width and height of a GIF87 or GIF89 image
ns_gmtime
— Return time in GMT form
ns_guesstype
— Lookup MIME Type
ns_hostbyaddr
— Resolve an IP address to a hostname
ns_hrefs
— Return list of HTML <A> links
ns_httpget
— Open an HTTP connection and fetch a page
ns_httpopen
— Open an HTTP connection
ns_httptime
— Convert time in seconds to HTTP header format
ns_info
— Find information about AOLserver
ns_insertrow
— Insert form data into specified table as a new row
ns_jpegsize
— Determine the width and height of a JPEG image
ns_kill
— Send a signal to a process
ns_library
— Return directory for a server's Tcl library
ns_link
— Create a link
ns_localsqltimestamp
— Return a SQL timestamp containing the local time
ns_localtime
— Return local time
ns_log
— Write messages to the error log
ns_logroll
— Roll server log
ns_markfordelete
— Mark interpreter for deletion
ns_menu
— Administer server in control port
ns_mkdir
— Create a directory
ns_mktemp
— Return a unique file name based on a template
ns_modlog
— Send message to the log
ns_modlogcontrol
— Define log realms
ns_modulepath
— Return server directory path
ns_mutex
— Manage mutexes
ns_normalizepath
— Normalize a path
ns_param
— Define a parameter in the configuration file
ns_parseheader
— Parse HTTP header
ns_parsehttptime
— Return number of seconds from HTTP time
ns_parsequery
— Parse a query string
ns_passwordcheck
— Verify a user/password combination
ns_perm
— Add users, groups, and permissions
ns_permpasswd
— Update existing password
ns_pooldescription
— Get database pool description
ns_queryexists
— Check for a key in the query data that was part of the HTTP request
ns_queryget
— Get a value from the query data that was part of the HTTP request
ns_querygetall
— Get multiple query values
ns_quotehtml
— Escape <, >, and & characters
ns_rand
— Generate a random number
ns_register_adptag
— Register a tag for use within an ADP
ns_register_filter
— Register a filter function for a method/URL combination
ns_register_proc
— Register one or two procedures for a method/URL combination
ns_register_trace
— Register a Tcl trace script to a method and matching URL
ns_rename
— Rename a file
ns_requestauthorize
— Check permissions
ns_respond
— Build a complete response
ns_return
— Return information to client
ns_rmdir
— Remove a directory
ns_rollfile
— Roll an arbitrary file
ns_rwlock
— Create, destroy, and manipulate read/write locks
ns_schedule_daily
— Schedule a procedure to run once a day
ns_schedule_proc
— Schedule a procedure to run at specified intervals
ns_schedule_weekly
— Schedule a procedure to run once a week
ns_section
— Define a section in the configuration file
ns_sema
— Manage semaphores
ns_sendmail
— Send a mail message
ns_server
— Get information about the virtual server
ns_set
— Manipulate sets of key-value pairs
ns_set_precision
— Set precision for floating-point to string conversions
ns_setexpires
— Set Expires header
ns_share
— Share variable among all Tcl interpreters
ns_shutdown
— Shut down the server
ns_sleep
— Sleep for a specified number of seconds
ns_sockaccept
— Accept a new socket connection
ns_sockblocking
— Set socket blocking
ns_sockcallback
— Register a socket callback script
ns_sockcheck
— Check if a socket is connected
ns_socketpair
— Create a pair of connected sockets
ns_socklisten
— Create a new socket listening for connections
ns_socklistencallback
— Run script on connection
ns_socknonblocking
— Set socket nonblocking
ns_socknread
— Return bytes to be read
ns_sockopen
— Connect to a remote host on the specified port
ns_sockselect
— Determine readable file id's
ns_striphtml
— Remove HTML tags from a string
ns_symlink
— Create a symbolic link
ns_thread
— Manage threads
ns_time
— Return current time in seconds
ns_tmpnam
— Generate a temporary file name
ns_truncate
— Truncate a file to a specified length
ns_unlink
— Remove a file
ns_unregister_proc
— Unregister a procedure for a URL
ns_unschedule_proc
— Stop a scheduled procedure
ns_url2file
— Return file corresponding to URL
ns_urldecode
— Decode characters
ns_urlencode
— Encode characters in a URL
ns_uudecode
— Perform base-64 decode
ns_uuencode
— Perform base-64 encode
ns_write
— Write raw content back to the client
ns_writecontent
— Write content to a file
ns_writefp
— Write file contents to the connection
Next
Updated/Validated Commands