User Tag List

Results 1 to 9 of 9

Thread: how do you get the local ip adress

  1. #1
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how do you get the local ip adress

    Is there a way to get the local ip adress of a pc on a local network? I don't mean 127.0.0.1 but 192.168.x.x. I need it for an online game that also supports LAN gaming
    Also I don't want it to require an internet connect.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Posts
    1,027
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how do you get the local ip adress

    Not sure this will work unless you have a server running on localhost. You might try using 192.168.0.1 to get the router's server (if you have one) instead. If you connect to google.com it will work. Sorry, might have to use google as a last resort :P

    Start of frame-
    MooSock
    +Connect to "localhost" on port 80

    MooSock: On Connect-
    String
    +Set alterable string to GetLocalIP$("MooSock")
    MooSock
    +Disconnect

    That should get you your lan ip such as 192.168.0.4

  3. #3
    Clicker Multimedia Fusion 2
    Greg's Avatar
    Join Date
    Dec 2006
    Location
    Poland
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how do you get the local ip adress

    There's a way to get local IP adress from registry, but it's a multiple string, and Registry2 can't read it :/

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: how do you get the local ip adress

    You could try just getting the local IP without connecting (I am not sure if that will work with MooSock but it certainly works with my OINC socket beta, which you can get from the extension development forum).

  5. #5
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how do you get the local ip adress

    Quote Originally Posted by Jam
    You could try just getting the local IP without connecting (I am not sure if that will work with MooSock but it certainly works with my OINC socket beta, which you can get from the extension development forum).
    It does seem to work, and it gives me the right IP, however, when I turn off my internet connection it returns "127.0.0.1" as my local IP. I don't know why this is though D:

  6. #6
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: how do you get the local ip adress

    Any different with OINC socket?

  7. #7
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how do you get the local ip adress

    use pipe and a bat with "ipconfig/all"

    gives you all the information you'll need.

  8. #8
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how do you get the local ip adress

    Quote Originally Posted by Jam
    Any different with OINC socket?
    I was talking about when using the OINC socket.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export ModuleXNA Export Module
    Fusion 2.5 (Steam)
    Mathias's Avatar
    Join Date
    Jun 2006
    Location
    Copenhagen, Denmark
    Posts
    1,083
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: how do you get the local ip adress

    I've posted an example here.

    EDIT: Sorry, I just checked out OINC Socket, it seems to have that feature implemented already .

Similar Threads

  1. Browse local network LAN computers / Trouver et explorer les machines du réseau local
    By duwayy in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 23rd October 2013, 09:28 AM
  2. Roll & Yaw = local, Pitch = not local????
    By Gibbon in forum OpenGL
    Replies: 1
    Last Post: 19th August 2010, 02:05 AM
  3. Making master server, but can't get ip adress?
    By NeoMonkey in forum Lacewing
    Replies: 9
    Last Post: 22nd January 2010, 05:23 PM
  4. Using dotNet to get the MAC adress from a computer
    By Quinto in forum dotNet Scripting
    Replies: 1
    Last Post: 11th April 2008, 10:46 PM
  5. MooClick et le Local
    By Calimero in forum Multimedia Fusion 2 - Technical Support
    Replies: 27
    Last Post: 24th September 2007, 08:18 PM

Posting Permissions

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