• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Dynamic Host Check

Elite Diviner
Joined
Aug 10, 2006
Messages
429
Reaction score
119
As long as i have been running small priston tale servers, i have always had a dynamic ip address on my test server, this i use for good rl friends to connect and private testing. This has always been a problem as i have constantly had to keep giving people my ip address whenever it changes. I have written a piece of code that will get the ip of the server from its dynamic web address. I use no-ip. You can add this piece of code into a launcher to make it work that way if you wish. You can even change the string to a secure string so that it cant be hexed out easily. Here is the code.

Code:
Imports System.Net

Public Class Form1

 
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try

            Dim iphost As IPHostEntry = Dns.GetHostEntry("openpt.servegame.com")
            Dim ipreturn = iphost.AddressList(0).ToString()
            MsgBox("Gzuz's Server ip is currently - " & ipreturn, vbInformation, "IP Tester")

            End

        Catch ex As Exception
            MsgBox(ex)
        End Try
    End Sub
End Class

Dns.GetHostEntry("openpt.servegame.com")
change the address within there to get what you are looking for. If you wish to add this into a launcher such as mine you will have to do something like:
Code:
ipaddr = returnip
my.computer.registry.write({location},ipaddr)
my.computer.filesystem.deletefile({location of ptreg.rgx file})
 
Last edited:
Back
Top