AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   External Script (https://forums.alliedmods.net/showthread.php?t=11555)

Z3ro 03-22-2005 23:38

External Script
 
I'm attempting to create a script in PHP that will ping a given server, and return the player list and what not. The server is a Condition Zero game with the AMX mod running... any direction or help with this would be great.

And I know there are a few services out there that do this for you, but I need to be able to do the customizing and what not.

Thanks.

xeroblood 03-22-2005 23:53

Well, I am working on an open-source project for CS that does that kinda stuff, and it is written in PHP4..

You can DL the source code for it from the bottom of the site and you shouldn't have any problems configuring it to work with CZ...

Half-Life Server Browser

Note: it is far from done, and quite small still..

Z3ro 03-23-2005 01:21

alright... kinda browsing through it... and this is along the lines of what I was planning, I think... minus the rcon part. I was more thinking along the lines of what www.gametiger.com does. Am I going to redo alot of your stuff to take out the rcon functions?

EDIT: It will be like www.gametiger.com but it won't be a search engine, it'll just display the information about a single server. (The site is for a clan, it will be display the current information about that clan's server)

Twilight Suzuka 03-23-2005 09:44

If we had a UDP module you could do it lickity split....

xeroblood 03-23-2005 11:32

Quote:

Originally Posted by Z3ro
Am I going to redo alot of your stuff to take out the rcon functions?

EDIT: It will be like www.gametiger.com but it won't be a search engine, it'll just display the information about a single server. (The site is for a clan, it will be display the current information about that clan's server)

Well, that is exactly what I have planned for HLSB -- to incorporate it with a single server by hard-coding the IP/Port and RCON password for a specific server...

You cant just remove the RCON stuff tho, or it wont work at all!! In order for a third-party program to access the Remote Console operations of any HL game server it must follow the "Rcon Challenge Request" procedure by providing a valid rcon password.. Think about it, if your HL game server allowed everyone to connect to the server through third-party socket programs (like PHP with sockets) *without* requiring an Rcon password, then anyone could write a script to change *your* servers map, configs, etc.. You see, by querying the server for information the script is actually sending a Remote Console command called 'status' and then catching the returned data.

If you want to manipulate HLSB to work for you now, all you have to do is Hard-Code the Server IP / Port / Rcon Password into the script, and remove the input boxes...

You can do whatever you want with it, it is open-source!!

Z3ro 03-23-2005 12:46

ok, the logic behind having to have the rcon password makes perfect sense, but how does a site like gametiger do it? I know for a fact that they don't have the rcon password to every single server on the master list... so there must be a way around having to have the rcon password =)

Johnny got his gun 03-23-2005 13:15

You can query the master servers for the server lists, and I think you get some basic info with those, or maybe not, I don't remember, was a long time ago I did that. And the protocol was updated recently, read the hlcoders mailing list. The info was posted the other week/month.

XxAvalanchexX 03-23-2005 17:14

Old project. Worked fine on localhost, but seemed to freeze up on another web server. You're welcome to use it if you can get it to work. I think it had to do with how I fetched data.

|2eM!x 03-23-2005 17:58

what language you all writing in?

xeroblood 03-23-2005 18:07

HLSB is in PHP


All times are GMT -4. The time now is 10:03.

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