PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Managing the type of address
  • Special cases
Products
WinDevWebDev - Server codeWebDev - Browser codeWinDev MobileReports and Queries
Platforms
WindowsLinuxWindows MobileUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadApple Watch
Languages
JavaPHPAjaxUser code (UMC)External language
Databases
HFSQLHFSQL Client/ServerStored proceduresOLE DBODBCNative Accesses
WebserviceClientIPAddress (Function)
In French: WebserviceAdresseIPClient
Returns the IP address of the computer that uses and calls the webservice.
Caution: The Webservice must be hosted by the WEBDEV application server.
Example
// Returns the IP address of the client
ClientAddress is string
ClientAddress = WebserviceClientIPAddress()
Syntax
<Result> = WebserviceClientIPAddress([<Type of Address>])
<Result>: Character string
IP address of the computer of the Web user:
  • If the connection is in IPv4, the response is in "xxx.xxx.xxx.xxx" format (for example: 195.196.100.1).
  • If the connection is in IPv6, the response is in IPv6 format.
<Type of Address>: Optional boolean
  • True to retrieve the initial address specified in the HTTP header,
  • False (default value) to retrieve the IP address in the environment variable "REMOTE_ADDR" defined by the Web server.
Remarks

Managing the type of address

The address returned by WebserviceClientIPAddress may not correspond to the address of the client (if a non-transparent proxy or a Load Balancer is used for example). In this case, WebserviceClientIPAddress returns the IP address of the proxy or the IP address of the Load Balancer.
If the initial address is requested, WebserviceClientIPAddress tries to read the address specified in the HTTP headers. Indeed, 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.

Special cases

  • If the initial address is not found or if it is invalid (address too long for example), the "standard" address is sent.
  • The IP address of the server is returned by NetIPAddress.
Components
Reports and Queries wd210awws.dll
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment