PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Accepting (or not) the return address
  • IP address of the server
  • Cached sessions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns the IP address of the computer of Web user connected to the WEBDEV site.
Note: If the Web user is behind a router, the IP address will be the one of the router. In this case, to retrieve the real IP address of the Web user, the only possibility consists in using an active content such as a Java applet in the page.
To get this information from a Webservice, use WebserviceClientIPAddress.
Example
// Returns the IP address of the Web user
sClientAddress is string = BrowserIPAddress()
Syntax
<Result> = BrowserIPAddress([<Accept Return Address>])
<Result>: Character string
IP address of the computer of the Web user:
  • in IPv4 format: xxx.xxx.xxx.xxx. For example: 195.196.100.1
  • in IPv6 format: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
<Accept Return Address>: Optional boolean
  • True to accept the initial address specified in the HTTP header,
  • False (default value) to refuse this address. In this last case, the IP address is retrieved in the environment variable (REMOTE_ADDR) defined by the Web server.
By default, the address specified in the HTTP header is refused for security reasons.
PHP This parameter is not supported.
Remarks
WEBDEV - Server codeWindowsLinux

Accepting (or not) the return address

The address returned by BrowserIPAddress may not correspond to the address of the Web user (if a non-transparent proxy or a Load Balancer is used for example). In this case, BrowserIPAddress returns the IP address of the proxy or Load Balancer.
If the return address is accepted, BrowserIPAddress tries to read the initial address specified in the HTTP headers (most of the proxies provide the initial address in the HTTP headers). However, this address must be used with great care because it is not reliable and it can be entirely wrong.
Notes:
  • If the initial address is not found or if it is invalid (address too long for example), the "standard" address is sent.
  • In test mode, BrowserIPAddress returns the address of the development computer.

IP address of the server

The IP address of the server is returned by NetIPAddress.
Versions 20 and later

Cached sessions

If your project is using cached sessions, this function must not be used in the "Initializing the project" process. This function must be used in the "Initializing the project after connection to the site" process.
New in version 20

Cached sessions

If your project is using cached sessions, this function must not be used in the "Initializing the project" process. This function must be used in the "Initializing the project after connection to the site" process.

Cached sessions

If your project is using cached sessions, this function must not be used in the "Initializing the project" process. This function must be used in the "Initializing the project after connection to the site" process.
Components
WEBDEV - Server code wd230page.dll
Linux wd230page.so
Minimum required version
  • Version 9
Comments
Click [Add] to post a comment