Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Can I Get My IP Address ?
Message
From
12/07/2001 13:31:32
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/07/2001 09:14:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00528550
Message ID:
00529855
Views:
19
>Sorry For My Poor English..
>I Will Make a Comparison Between My IP Address And Server IP Address.
>I Know Server IP Address Previously.
>How Can I Get My IP Address ?
>Thanks..

Sunny,
If you meant from within VFP then this is from John Harvey (FAQ ID: 457)
* getipaddress.prg 
* John Harvey
* 9/28/98
* Leave IPSocket public to view all properties in the debug window.
* I stumbled on this routine while trying to find information on subclassing
* the WSH and thought it might be useful.
public IPSocket
crlf=chr(13)+chr(10)
* Show local ip address
IPSocket = CreateObject("MSWinsock.Winsock")
if type('IPSocket')='O'
IPAddress = IPSocket.LocalIP
localhostname=IPSocket.localhostname
remotehost=IPSocket.remotehost
remotehostip=IPSocket.remotehostip
MessageBox ("Local IP = " + IPAddress+crlf+"local host = "+localhostname;
+crlf+"Remotehost = "+remotehost+crlf+"Remotehostip = "+remotehostip)
else
MessageBox ("Winsock Is Not Installed!")
endif
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform