slitaz-base-files view doc/httphelper.txt @ rev 152

Sorry Christian I had a libpkg.sh ready to commit (libtaz.sh is in /lib since it is used in boot process, other libs must go in /usr/lib to be FSH compliant)
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 11 16:06:07 2012 +0200 (2012-05-11)
parents
children 581ddfa0d620
line source
2 SYNOPSIS
3 . /usr/lib/slitaz/httphelper.sh
4 function
6 DESCRIPTION
7 Httphelper is a CGI SHell helper providing PHP a like syntax and
8 usefull functions to encode or crypt strings. Httphelper let you
9 easily parse QUERY_STRING and work on any webserver supporting CGI.
11 FUNCTIONS
12 GET [var [index]]
13 POST [var [index]]
14 COOKIE [var [index]]
15 FILE [var {name|tmpname|size|type}]
16 header [strings]
17 http_urlencode string
18 urlencode string
19 urldecode string
20 htmlentities string
21 md5crypt string
22 sha512crypt string
23 httpinfo
24 httphelper
26 EXAMPLES
27 header "Content-type: text/html" "Set-Cookie: name=value; HttpOnly"
29 value=$(GET name)
30 if [ "$value" ]; then
31 echo "Input name has a value: $value"
32 fi
34 AUTHOR
35 Written by Pascal Bellard and Christophe Lincoln