Deutsch English
Alphabetical index
Array functions
CGI functions
  • cgibuffer()
  • cgiclearbuffer()
  • cgiclosebuffer()
  • cgiexec()
  • cgigetparam()
  • cgigetsession()
  • cgitestparam()
  • cgitestsession()
  • cgiwrite()
  • cgiwritehtml()
  • cgiwriteln()
  • cgiwritetemplate()
  • endcgi()
  • endsema()
  • getquerystring()
  • http_post()
  • initcgi()
  • waitsema()
    Data types
    Date functions
    Debugging
    Fulltext functions
    Language elements
    Numerical functions
    Operators
    Other functions
    Ramtext functions
    Selecting
    Socket functions
    Statistical functions
    Stream functions
    String functions
    System functions
    Table functions
    Text functions
    Home    Overview    Search    Impressum    Contact    Members
    Topic complex CGI functions
    Function cgitestsession()
    Short Checks a session id for validity
    Syntax CGITESTSESSION(SessionID : STRING) : INTEGER
    Parameter SessionID : a session id returned by CGIGETSESSION, which can be arbitrarily extended.
    Return 0 : session not valid because not matching corresponding IP address

    else: 1+number of seconds, that have gone since the session id had been established
    See also:
    cgigetsession()
    Description A session id should be tested if it is valid espacially at sensible transmission on signals.
    CGITESTSESSION does not provide 100 percent protection against vicious attacks, but suspends the huge number of "accidental" accesses to session applied data effeciently.

    Example 1: CGITestSession



    VAR SessionID : STRING
    VAR SessionTest : INTEGER
    ...
      SessionID:=CGIGetParam("sessionid")
      SessionTest:=CGITestSession(SessionID)
      IF SessionTest=0 THEN
         // illegal session because of different IP numbers
      ELSIF SessionTest>3600 THEN
         // TimeOut because this session was valid only for one hour
      ELSE
         // here it is all right
      END
    


    User comments:
    Write a comment:
    Name
    EMail
    Subject
    Text (Switch mode)

    Choose between
    the normal and the
    advanced editor.
    The advanced editor
    runs in IE 5+ and
    Mozilla 1.4+ only
    SPAM-Protection Please enter tdbengine in this field.

    tdbengine chat
    irc.tdbengine.org
    #tdbengine

       Copyright © 2003-2004 tdb Software Service GmbH
       Alle rechte vorbehalten. / All rights reserved
       Last changed: 21.10.2004
    {Fehler für :execmacro{execmacro="sessionspy"}