PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
PageReadHeaderHTTP (Function)
In french: PageLitEntêteHTTP
Reads and returns one or more HTTP headers received by the current page (these headers are sent by the client to the server in the current request).
Example
sReferer is string = PageReadHeaderHTTP("Referer")
// Example for retrieving all incoming HTTP headers
// Browse the incoming HTTP headers
nHeaderSubscript is int
sAHeader is string
sAllHeaders is string
 
LOOP
// Next header
nHeaderSubscript ++
sAHeader = PageReadHeaderHTTP(nHeaderSubscript)
// Header read?
IF sAHeader = "" THEN BREAK  // no other header
sAllHeaders += [CR] + sAHeader
END
Info(sAllHeaders)
Syntax

Reading a header identified by its name Hide the details

<Result> = PageReadHeaderHTTP(<Header to read>)
<Result>: Character string
  • Header value.
  • Empty string ("") if the header is not found.
<Header to read>: Character string
Name of header to read.

Reading a header identified by its subscript Hide the details

<Result> = PageReadHeaderHTTP(<Subscript>)
<Result>: Character string
  • Header value. The header name is returned in uppercase characters and the dashes are replaced with "underscore" characters (the initial name of HTTP header as it was sent by the client is not available).
  • Empty string ("") if there is no header to read.
<Subscript>: Integer
Subscript of header to read.
Remarks
  • In a dynamic site, the headers are the HTTP headers received when connecting to the site.
  • To list all the headers, use the syntax by subscript until the function returns an empty string.
Component: wd270page.dll
Minimum version required
  • Version 21
Comments
Click [Add] to post a comment