How can i give Ip address in one variable?
i really need to this.
thanks.
Give IP Address in one variable
-
- Enthusiast
- Posts: 792
- Joined: Sat Aug 09, 2003 3:13 am
- Location: 90-61-92 // EU or ASIA
- Contact:
Code: Select all
InitNetwork()
b1.s=Hostname()
r1.l=gethostbyname_(@b1)
r2.l=PeekL(PeekL(PeekL(r1+12)))
Debug r2 ; what do you need?
Debug IPString(r2) ;ipv4 with dot
Is this what u meant? Cause my code puts local IP address straight to a variable if thats what u meant
I put a message requester in there just to prove it works 
If you want the IP address in Long form etc just take out the IPString() and make the variable a long, you prob knew that so sry.
Code: Select all
InitNetwork()
InitNetwork()
ExamineIPAddresses()
AA$ = IPString(NextIPAddress())
MessageRequester("Local IP", "Local IP Address is : "+AA$+" ",#PB_MessageRequester_Ok)

If you want the IP address in Long form etc just take out the IPString() and make the variable a long, you prob knew that so sry.