moving companies : Computers : Programming : Languages : PHP : Common Problems : Forms and User Input : URLs and Post or Get Methods

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

9 of 10 people (90%) answered Yes
Recently 6 of 7 people (86%) answered Yes

Entry

Is there any variable or function to get the length of all data being received (posted data, header, etc)?

May 16th, 2001 20:53
Philip Olson, Santoso Nugroho,


A few predefined variables that may interest your are :
  CONTENT_LENGTH : The length in bytes of the content being 
                   passed (set by the client), available as an
                   environment variable for CGI scripts.
  HTTP_POST_VARS : An associative array of variables passed to 
                   the current script via the HTTP POST method.
  HTTP_GET_VARS  : An associative array of variables passed to 
                   the current script via the HTTP GET method. 
More Information on predefined variables can be seen here :
  PHP Manual : Predefined Variables                             :
  ---------------------------------------------------------------
  http://www.php.net/manual/en/language.variables.predefined.php
A Faqt exists on accessing these variables :
  Can I access Environment Variables from inside PHP scripts    ?
  ---------------------------------------------------------------
  http://www.faqts.com/knowledge_base/view.phtml/aid/33/