PTM Logo Version 0.5.1 Beta
Home    SVN    Downloads    Documentation    Forum    Contact
This Site is 100%
Powered by PTM

SourceForge.net Logo
Documentation
I   Index
II   GNU GPL
III   Description
IV   Installation
V   Language Overview
VI   Tags
VII   Variables
VIII   Functions
  _PTM()
  _PTM_FILE()
  append_file_text()
  basic_header()
  delete_cookie()
  end_session()
  get_dir_list()
  get_file_text()
  is_secure()
  is_session()
  nohtml()
  redirect_header()
  session_add()
  session_delete()
  session_domain()
  session_id()
  session_name()
  session_path()
  session_secure()
  set_basic_header()
  set_cookie()
  set_redirect_header()
  start_session()
  update_session()
  write_file_text()
IX   Modules
Documentation
View / Download this file.
--------------------------
redirect_header() FUNCTION
--------------------------

  ------------
  USAGE FORMAT
  ------------

    Within a PREPROCESS tag:
    Where $http_header is an HTTP header buffer:

    $http_header = &redirect_header($url);
    $http_header = &redirect_header($url, $delay);

  -----------
  DESCRIPTION
  -----------

    Returns a fully qualified "redirect" HTTP header. Technically, the returned
    header is a refresh header with an optionally alternate URL given. This is
    because not all browsers support the actual "redirect" header type, so this
    change was made to compensate for compatibility issues.  Note that the
    entire page will be loaded before redirection occurs, so care should be
    taken to prevent page loading when ONLY a redirect is reqired without
    showing page contents. May be used ONLY in a PREPROCESS tag.

  ---------
  ARGUMENTS
  ---------

    $url

      REQUIRED

      The full URL to which you wish to redirect the user.

    $delay

      OPTIONAL
      
      The number of seconds you wish to delay on the page before redirecting.
      This most often gives the user a chance to read a redirection message
      before the redirection occurs. If no delay time is given, no delay is
      assumed.

  -------
  RETURNS
  -------

    A fully qualified redirect (refresh) header complete with double new line
    character (\n) termination.

  --------------
  USAGE EXAMPLES
  --------------

    --------------------------------------------------------------------------
    Example 1: Redirecting to Another Page After 5 Seconds in a PREPROCESS Tag
    --------------------------------------------------------------------------

      <?: $_HEADER = &redirect_header('http://www.mysite.com/page2.ptm', 5); ?>

  --------
  SEE ALSO
  --------

    TAGS

      PREPROCESS

    VARIABLES

      $_HEADER

    FUNCTIONS

      basic_header(), set_basic_header(), set_redirect_header()
Home    SVN    Downloads    Documentation    Forum    Contact