PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Accepting (or not) the return address
  • IP address of the server
  • Pre-launched 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 server is returned by NetIPAddress.
Versions 20 and later

Pre-launched sessions

If your project uses pre-launched sessions, this function must not be used in the project "Initializing" event. This function must be used in the event "Initializing the project after connection to the site".
New in version 20

Pre-launched sessions

If your project uses pre-launched sessions, this function must not be used in the project "Initializing" event. This function must be used in the event "Initializing the project after connection to the site".

Pre-launched sessions

If your project uses pre-launched sessions, this function must not be used in the project "Initializing" event. This function must be used in the event "Initializing the project after connection to the site".
Component : wd240page.dll
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment