Das ging auch ohne externe Webseite.
Ich hatte mal einen Code gefunden, der die Mac Adresse ausliest. (PureArea oder hier im Forum... ihr wißt ja... das alter

)
Nach einer kleinen Modifikation ermittelt das Teil nun die eigene IP-Adresse.
(Also nicht die LAN IP)
Code: Alles auswählen
Structure IP_ADDR_STRING
pNext.l
IpAddress.b[16]
IpMask.b[16]
Context.l
EndStructure
Structure IP_ADAPTER_INFO
Next.l
ComboIndex.l
AdapterName.b[260] ; MAX_ADAPTER_NAME_LENGTH + 4
Description.b[132] ; MAX_ADAPTER_DESCRIPTION_LENGTH + 4
AdressLength.l
Address.b[8] ; MAX_ADAPTER_ADDRESS_LENGTH
Index.l
Type.l
DhcpEnabled.l
CurrentIpAddressPTR.l
IpAddressList.IP_ADDR_STRING
GatewayList.IP_ADDR_STRING
DhcpServer.IP_ADDR_STRING
HaveWins.l
PrimaryWinsServer.IP_ADDR_STRING
SecondaryWinsServer.IP_ADDR_STRING
LeaseObtained.l
LeaseExpires.l
EndStructure
Procedure.s N_GetOwnIP()
Protected length.l=0, *Buffer, adapters, x, i, byte.b
Protected tempipinfo.IP_ADAPTER_INFO
Protected Result = GetAdaptersInfo_(0,@length)
Protected Adapter.s, Adresse.s, Mac.s = ""
If Result=#ERROR_BUFFER_OVERFLOW
*Buffer = AllocateMemory(length)
Result = GetAdaptersInfo_(*Buffer,@length)
If Result=#ERROR_SUCCESS
adapters=length/SizeOf(IP_ADAPTER_INFO)
For x=0 To adapters-1
tempipinfo.IP_ADAPTER_INFO
For i=0 To SizeOf(IP_ADAPTER_INFO)-1
byte.b=PeekB(*Buffer+(x*640)+i)
PokeB(tempipinfo+i,byte)
Next i
Adapter.s = PeekS(@tempipinfo\Description)
If Left(Adapter,4) = "WAN "
Adresse.s = PeekS(@tempipinfo\IpAddressList+4)
EndIf
mac =""
For i=0 To 5
byte.b=PeekB(@tempipinfo\Address+i)
If byte>=0
mac+RSet(Hex(byte),2,"0")
Else
mac+RSet(Hex(byte+256),2,"0")
EndIf
If i<5
mac+":"
EndIf
Next i
Next x
Else
Debug "Error : "+Str(Result)
EndIf
EndIf
ProcedureReturn Adresse
EndProcedure
Debug N_GetOwnIP()
funktioniert unter 4.30, sollte aber eigentlich auch unter 4.1 funktionieren...
Mich wundert nur, dass keiner der "Profs" das erwähnte ....