Tech Tip: How to get the server IP address from a client machine
PRODUCT: 4D | VERSION: 11.6 | PLATFORM: Mac & Win
Published On: April 2, 2010
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
An easy way to get the server's IP address from the client machine is to use the IT_MyTCPAddr command from the 4D Internet Commands plugin. To implement this:
- Install the 4D Internet Commands.bundle in the database Plugins folder.
- Create a method with the Execute on server property checked on. The method below named Util_IpAddress will work for this:
`--- Method Util_IpAddress
`This method has Execute on server property checked on
- Create another method that calls Util_IpAddress from the client. The method below named getServer_IpAddress does this:
- Execute getServer_IpAddress to retrieve the IP.