Jump to content

How can i get my server ip


ScaWscR

Recommended Posts

Posted

How can i get my server ip

The wiki func:

function getServerIp() 
    callRemote("http://www.nub.hj.cx/getServerIp.php",function(value) 
     if value ~= "ERROR" then 
      ip = value 
     end 
    end) 
    return ip 
    end 

don't working how can fix it?

Posted

The url seems to not be working anymore try to use sth ike this

local ip = "1.2.3.4" 
  
function getServerIP() 
    return ip 
end 

Posted

Guys, this is easy. Really easy, in-fact I'm still surprised that there are so many people in these forums that are so inexperienced. I don't mean to be rude, but this one is very obvious. I suggest someone updates those forum pages immediately too. That website is outdated and broken, they should have used one that has a higher reputation.

http://bot.whatismyipaddress.com/ - 16 Years running and a great service, use this URL.

https://api.ipify.org/ - Great, kinda new and should be here for a long tiem to come.

Use either one.

function getServerIp() 
    callRemote("http://bot.whatismyipaddress.com/",function(value) 
     if value ~= "ERROR" then 
      ip = value 
     end 
    end) 
    return ip 
    end 

I suggest not giving people other alternatives, the guy asked for a method to programmatically get his IP, not so he can define it with an IP Variable.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...