getting own ip adress?

Just starting out? Need help? Post your questions and find answers here.
muab256
User
User
Posts: 43
Joined: Mon Apr 28, 2003 4:57 pm

getting own ip adress?

Post by muab256 »

heyas =)

is there a simple way to get your own (internet)ip adress?

ok, runprogram "ipconfig>temp.txt" then processing the temp.txt
might do the job, but it doesnt look nice...

im sure there is a simple command in pure basic (i dont know
of yet)...

ho knows? =)

thx
muab
Saboteur
Enthusiast
Enthusiast
Posts: 272
Joined: Fri Apr 25, 2003 7:09 pm
Location: (Madrid) Spain
Contact:

Post by Saboteur »

Look at the network help:

Code: Select all

InitNetwork()
ExamineIPAddresses()
Debug IPString(NextIPAddress())
[:: PB Registered ::]

Win10 Intel core i5-3330 8GB RAM Nvidia GTX 1050Ti
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

i posted a tcp/ip sample with winsock a while back, that's another solution
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
AngelSoul
User
User
Posts: 55
Joined: Tue Jul 29, 2003 9:16 am
Location: Canada

Post by AngelSoul »

Take a look here:
viewtopic.php?t=7347&highlight=adapter

It is a sample code that enumerates network adapters with their current IP address
AMD 1.8 - 512mb - ATI All-In-Wonder Radeon 9000 pro - W2k Pro
BASIC programmers never die, they just return without gosub.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post by ricardo »

Thanks!! :D
ARGENTINA WORLD CHAMPION
Post Reply