Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6 How to: Get the IP address of the machine
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00893826
Message ID:
00895025
Views:
24
I assumed that the internal one was what he was looking for - if it is internal (intranet) it would not be visible to the public.
This routine works in what I think is a similar situation, where we need to know the IP address of a workstation for troubleshooting purposes.

>Ashley
>In his case, this won't work for him, since he will get the internal IP address, not the external ( public ) one.
>Jaime
>
>>An alternative I've used:
>>
>>! ipconfig > c:\ip.txt
>>cIP=filetostr('c:\ip.txt')
>>cIP=substr(cIP,at('IP Address',cIP),at('Subnet Mask',cIP)-at('IP Address',cIP))
>>cIP=substr(cIP,at(': ',cIP)+1)
Previous
Reply
Map
View

Click here to load this message in the networking platform