Jump to content

GetServerIp() fetch.remove


JeViCo

Recommended Posts

  • 1 month later...

solved.

SERVER_IP = "127.0.0.1"

function getServerIp()
    return SERVER_IP
end

fetchRemote("http://checkip.dyndns.com/",
    function (response)
        if response ~= "ERROR" then
            SERVER_IP = response:match("<body>Current IP Address: (.-)</body>") or "127.0.0.1"
        end
    end
)

i used SERVER_IP variable after fetchRemote function. I used it inside of function and it solved my problem

Link to comment

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...