Posts: 1,028
Threads: 45
Joined: May 2009
Reputation:
0
Hey!
One (easy) question: How can I get the IP of the Server, where the Sa-mp Server is running on? (So 'my' Ip, when i run the server)
Thank you.
Posts: 1,028
Threads: 45
Joined: May 2009
Reputation:
0
I know... =P. I wanted to know how i can get this in a script, thats why i put it into scripting discussion. I need to put the IP's that run my script into a Database, thats why i need to get them.
Posts: 6,129
Threads: 36
Joined: Jan 2009
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
I don't think so. To my knowledge, the only option to get the ip the server is running on, is by using GetServerVarAsString, but this requires the bind identifier to be set, like Calgon said.
Posts: 1,047
Threads: 23
Joined: Jun 2009
Yes you can. I actually did it and it works, just print out tje ip with print(""); (not ' ' !) and then 'download' the printed text with pawn, ex mysite.com/ip.php
Код:
//ip.php
<?php
print("$_SERVER[REMOTE_ADDR]");
?>