Raised This Month: $32 Target: $400
 8% 

get server ip adress


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mercury
Member
Join Date: Jun 2004
Old 07-20-2006 , 01:16   get server ip adress
Reply With Quote #1

is it possible to get server ip adress or hostname in amxx?

p.s. these keywords are too short for searching..
__________________
mercury is offline
mercury
Member
Join Date: Jun 2004
Old 07-20-2006 , 01:19   Re: get server ip adress
Reply With Quote #2

get_user_ip(0)
__________________
mercury is offline
mercury
Member
Join Date: Jun 2004
Old 07-20-2006 , 01:22   Re: get server ip adress
Reply With Quote #3

well, this gives me ip
but what about hostname?
__________________

Last edited by mercury; 07-20-2006 at 01:25.
mercury is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 07-20-2006 , 02:39   Re: get server ip adress
Reply With Quote #4

amx_cvar hostname


It will say hostname "Whatever the hostname is"
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
mercury
Member
Join Date: Jun 2004
Old 07-20-2006 , 23:09   Re: get server ip adress
Reply With Quote #5

SweatyBanana, sorry you get me wrong.
i mean hostname of the physical server itself not a game server
__________________
mercury is offline
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 07-21-2006 , 16:31   Re: get server ip adress
Reply With Quote #6

Quote:
Originally Posted by mercury
SweatyBanana, sorry you get me wrong.
i mean hostname of the physical server itself not a game server
The network'd computer's hostname? If so, you can't do that.
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 07-21-2006 , 17:01   Re: get server ip adress
Reply With Quote #7

Quote:
Originally Posted by mysticssjgoku4
The network'd computer's hostname? If so, you can't do that.
Yes you can, it's just not very well abstracted. You can connect to a PHP server or some other server running a language capable of sockets interaction, and tell it to do a DNS lookup then transfer the data back.

Is it easy? Not really, and I'm not even going to try it myself, but it's possible.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 07-21-2006 , 17:37   Re: get server ip adress
Reply With Quote #8

Lol, well jesus hawk, I was talking mere purely PAWN without using any sockets method.
And a DNS lookup would only return special information, and wouldn't return the computer's network name, but rather an IP address with special information such as that is similar to a WHOIS lookup.
The computer's name it-self is only used via LAN like the internal IP address. Both I believe are unreceivable unless a special type of open socket transfer is made on the host machine it-self to return that data. Otherwise it'll only return the outer network information through DNS. Such as the external IP address and/or Port number.
__________________


Last edited by mysticssjgoku4; 07-21-2006 at 17:39.
mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
Janet Jackson
Veteran Member
Join Date: Mar 2005
Location: far, far away from here
Old 07-21-2006 , 17:45   Re: get server ip adress
Reply With Quote #9

Computername ? Whois lookup ? This is about hostname, as in reverse DNS entry, right ?
__________________
Janet Jackson is offline
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 07-21-2006 , 18:02   Re: get server ip adress
Reply With Quote #10

Why would you want the hostname anyways?
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode