Get Server Ip with lua_error_url


I’m using a php website to store my lua errors in a database. Therefore I’m using the convar lua_error_url.
Is there any way to retrieve the ip adress of the server that made a POST request to the php website?

Google “get ip of request php”, my bro

I forgot to say that I also need the port of the gameserver. Getting $_SERVER[‘REMOTE_ADDR’] doesn’t return this afaik.

You’ll have to send the port yourself or something, because only the server knows it by default.

Is there any way to edit the lua_error_url function?
I know there is the gm_luaerror module but it isn’t working for me on Linux.

Just do something like matching game mode and IP addresses to identify the server. You really only need to know the add-on/gamemode to identify the errors as the code would be identical across servers.

Not a perfect idea, but it should work?

Yeah, that’s a good option. Thank you!

Why not on init do something like a mixed get and post request. Like
lua_error_url “

Does lua_error_url send only errors occurring on the server’s realm? Or also the client?

That’s a really good idea, thank you!
Don’t know why I did not get it myself :3

[editline]4th November 2016[/editline]

Both. Only problem is that it sometimes reports errors that a client had before in singleplayer.

Ah, that’s not very good.

Maybe something @Robotboy could take a look at?
The examples I’ve seen don’t report the name of the user that received the error. Is that in the array too?

The name/steamid is not in the array afaik.