Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
Help Script, verificare server cs offline / online
Freakz Forum Index
->
Trash Bin
->
Trash
->
Programming / Scripting / Database
Author
Message
4612
icezone
[Mentally Stable]
Status: Offline
(since 13-04-2020 17:12)
Joined: 31 Jul 2009
Posts: 59
,
Topics: 23
Location:
C:\windows\HERE
Reputation:
239.4
Votes
: 8
Posted: 07-08-2009, 21:49:17
| Translate post to:
... (
Click for more languages
)
Care ma ajuta si pe mine cu un script PHP care arata serverul de CS daca este ON sau OFF ?
Multumesc !
0
0
Back to top
Shocker
[
Freakz owner
]
Status: Offline
(since 08-02-2020 12:17)
Joined: Momentul zero
Posts: 33986
,
Topics: 1350
Location:
localhost
Reputation:
6485.6
Votes
: 829
Posted: 07-08-2009, 22:36:34
| Translate post to:
... (
Click for more languages
)
Din moment ce HLDS-ul foloseste protocolul UDP, nu poti sa deschizi o simpla conexiune si sa vezi daca s-a stabilit, pentru ca UDP-ul e diferit de TCP si nu creaza conexiuni permanente.
Trebuie sa trimiti un request la serverul de CS sa iti returneze informatii despre el. Daca primesti un pachet mai mare de 4 bytes inseamna ca ti-a raspuns => server online:
Code:
function checkServer($address, $port, $id, $timeout=5)
{
$fp=fsockopen("udp://$address", $port, $errno, $errstr, $timeout);
stream_set_timeout($fp, $timeout);
fwrite($fp, "\xFF\xFF\xFF\xFFTSource Engine Query".chr(0));
$state=(!fread($fp, 5))?"off":"on";
@fclose($fp);
return $state;
}
echo "Serverul war3.freakz.ro este: ".checkServer("war3.freakz.ro", 27015);
Rezultat:
Code:
Serverul war3.freakz.ro este: on
Asta am facut eu pentru freakz si merge ok
FREAKZ COMMUNITY @ Facebook
WOW FREAKZ @ Facebook
0
0
Back to top
icezone
[Mentally Stable]
Status: Offline
(since 13-04-2020 17:12)
Joined: 31 Jul 2009
Posts: 59
,
Topics: 23
Location:
C:\windows\HERE
Reputation:
239.4
Votes
: 8
Posted: 08-08-2009, 00:28:41
| Translate post to:
... (
Click for more languages
)
Mersi Frumos !
0
0
Back to top
Gringo
[Mentally Stable]
Status: Offline
(since 11-08-2009 18:00)
Joined: 11 Aug 2009
Posts: 3
,
Topics: None
Location:
Slovakia
Reputation:
85.1
Votes
: 4
Posted: 11-08-2009, 14:55:55
| Translate post to:
... (
Click for more languages
)
Mã puteþi ajuta?
Starea mea de pe server de jucatori online nu apar
Code:
define("A2S_SERVERQUERY_GETCHALLENGE", "W"); // request challenge
define("A2S_INFO", "TSource Engine Query\0"); // server info request
define("A2S_PLAYER", "U"); // request player list
define("A2S_RULES", "V"); // request rules list
define("S2C_CHALLENGE", "A"); // challenge response (HL2)
define("S2A_INFO", "I"); // info response (HL2)
define("S2A_INFO_DETAILED", "m"); // info response (HL1)
define("S2A_PLAYER", "D"); // player response
define("S2A_RULES", "E"); // rules response
Mulþumesc
0
0
Back to top
Shocker
[
Freakz owner
]
Status: Offline
(since 08-02-2020 12:17)
Joined: Momentul zero
Posts: 33986
,
Topics: 1350
Location:
localhost
Reputation:
6485.6
Votes
: 829
Posted: 11-08-2009, 15:05:03
| Translate post to:
... (
Click for more languages
)
The code you entered doesn't help, what exactly doesn't work? What script are you using ?
FREAKZ COMMUNITY @ Facebook
WOW FREAKZ @ Facebook
0
0
Back to top
Gringo
[Mentally Stable]
Status: Offline
(since 11-08-2009 18:00)
Joined: 11 Aug 2009
Posts: 3
,
Topics: None
Location:
Slovakia
Reputation:
85.1
Votes
: 4
Posted: 11-08-2009, 15:33:10
| Translate post to:
... (
Click for more languages
)
Hi, I am using this script
http://sourceforge.net/projects/hlwhosonline/
Server rulles showing up, but online players, frags and time no
0
0
Back to top
Shocker
[
Freakz owner
]
Status: Offline
(since 08-02-2020 12:17)
Joined: Momentul zero
Posts: 33986
,
Topics: 1350
Location:
localhost
Reputation:
6485.6
Votes
: 829
Posted: 11-08-2009, 18:33:42
| Translate post to:
... (
Click for more languages
)
Maybe it's outdated, Valve changed several stuffs at the queries. Try CZarQuery
FREAKZ COMMUNITY @ Facebook
WOW FREAKZ @ Facebook
0
0
Back to top
Gringo
[Mentally Stable]
Status: Offline
(since 11-08-2009 18:00)
Joined: 11 Aug 2009
Posts: 3
,
Topics: None
Location:
Slovakia
Reputation:
85.1
Votes
: 4
Posted: 11-08-2009, 19:39:18
| Translate post to:
... (
Click for more languages
)
I have also tried CZarQuery, lgls and phgstats,, but even there are not online players. Only on your system at
https://www.freakz.ro/server/
What the type of queries do you use? For Counter strike server with dproto
Thanks
0
0
Back to top
Shocker
[
Freakz owner
]
Status: Offline
(since 08-02-2020 12:17)
Joined: Momentul zero
Posts: 33986
,
Topics: 1350
Location:
localhost
Reputation:
6485.6
Votes
: 829
Posted: 11-08-2009, 21:02:21
| Translate post to:
... (
Click for more languages
)
It's custom made... I have analyzed Counter Strike and how it queries HLDS (dproto, cbooster, etc) for informations and reproduced that in PHP. Unfortunately I won't share my script
FREAKZ COMMUNITY @ Facebook
WOW FREAKZ @ Facebook
0
0
Back to top
Freakz Forum Index
->
Trash Bin
->
Trash
->
Programming / Scripting / Database
The time now is 03-12-2024, 09:11:09
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details