Results 1 to 6 of 6

Thread: How can i get ip and port ?

  1. #1

    Thread Starter
    Addicted Member ßädbö¥'s Avatar
    Join Date
    Jul 2003
    Location
    I Lost somewhere !!
    Posts
    198

    How can i get ip and port ?

    i m running the server programme on different machines and the ip of server changes according to the machine. how can i detect the ip and port of server programme

    ßädbö¥ Rü£z

    ICQ # : 204178672
    AOL SN : Badboy9jan
    badboy9jan<img src="images/smilies/s...g" />gmail.com

  2. #2
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089
    u are running on the server program on different machines?

    and the IP of the server changes?
    Doesnt make much sense to me.

    tell us more!!!

  3. #3
    Junior Member
    Join Date
    Dec 2003
    Location
    USA
    Posts
    21
    Why not create a timer that checks every 1 minute or so? Set the current IP/Port into a variable and check it.
    Code:
    Public strCurrentIP As String
    Public strCurrentPort As String
    Code:
    Private Sub Timer1_Timer()
    If strCurrentIP <> Winsock1.LocalIP Then
            strCurrentIP = Winsock1.LocalIP
    End If
    
    If strCurrentPort <> Winsock1.LocalPort Then
            strCurrentPort = Winsock1.LocalPort
    End If
    Edit: Oops, I reread your post and noticed that's not what you wanted. I guess you could always just get it that way and send it.
    Last edited by Trust; Jan 24th, 2004 at 08:36 AM.
    mmk

  4. #4
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152
    dont understand question lolol...
    but ermm

    winsock1.localport
    winsock1.localIP

    winsock1.remoteIP
    winsock1.remoteport

    also theres a module i had for winsock stuff....was very useful ill look for it if ihave time ...its commented too
    :::`DISCLAIMER`:::
    Do NOT take anything i have posted to be truthful in any way, shape or form.
    Thank You!

    --------------------------------
    "Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
    "Finaly I can look as gay as I want..." - NoteMe
    Languages: VB6, BASIC, Java, C#. C++

  5. #5
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    you cant.

    unless you:


    upload a textfile to fixed web site from server.

    download with client and read ip and port (ENCODE IT THOUGH)

    Connect
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  6. #6
    Frenzied Member Jmacp's Avatar
    Join Date
    Jul 2003
    Location
    UK
    Posts
    1,959
    just code a notification to icq, email etc, every tmie they log in.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width