Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Gathering server information

by Anonymous Monk
on Apr 11, 2004 at 14:10 UTC ( [id://344256]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I've only been using perl for about 2 years now, but I've only really used it for CGI and performing quick and dirt tasks on my linux box, but I have been proposed with a new problem. Does Perl have anything that would allow me to ping something like a CounterStrike or HalfLife server and get information about the current game running?? I've seen this done on other websites, but I wasn't sure if they were using Perl or one of their own creations.

Replies are listed 'Best First'.
Re: Gathering server information
by esskar (Deacon) on Apr 11, 2004 at 14:18 UTC
    Hi.
    well, i do not know about CS but PING is not a problem
    use Net::Ping; my $host = 'perlmonks.com'; my $p = Net::Ping->new(); print "$host is alive.\n" if $p->ping($host); $p->close();
Re: Gathering server information
by eXile (Priest) on Apr 11, 2004 at 15:58 UTC
    I think lots of information on this can be found via google. You'll need the specs for the communication protocol that is used for these servers (or an example program from which you can 'reverse engineer' the protocol). I think this site has some relevant information on programming for HalfLife. The search for Counterstrike information is left as an exercise to the reader. ;-)

    I think this might be a great way to learn network programming in perl, and maybe you'll even end up writing modules for these protocols and upload them to CPAN (I didn't find any modules there yet).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://344256]
Approved by cLive ;-)
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-24 23:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found