PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Accepting (or not) the return address
  • Server IP address
  • Pre-launched sessions
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
Returns the IP address of the client computer connected to the WEBDEV site.
Remark: If the Web user is behind a router, the IP address will be the one of the router.
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 rejected 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 user's address (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 original address specified in the HTTP headers (most proxies provide the original address in the HTTP headers). However, this address must be used with caution because it is not reliable and can be completely wrong.
Remarks:
  • If the original address is not found or is invalid (too long for example), the "standard" address is sent.
  • In test mode, BrowserIPAddress returns the address of the development computer.

Server IP address

The server IP address 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 initialization event. This function must be used in the "Initializing the project after connection to the site" event.
New in version 20

Pre-launched sessions

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

Pre-launched sessions

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