473,407 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Detecting if server program running

Hi guys,

I'm a C++ programmer, and I have created a game which has a client/server
architecture. What I would like to do is have my web page show if the
server is up and how many people are logged in at the time. Every five
minutes or so, I'd like for the web page to ping for the server, and if the
server is up, it should return a packet with the population number, which I
can then display on the front page. If there is no response from the server
(in, say, 5 seconds), then the page should show it as down.

Unfortunately, I'm a horrible php coder :) I can handle the server end code
no problem, as long as I know what to send such that the php code can read
it. What I don't know is how to send the initial request from the web page
to the server.

Both my web page and my server have fixed IP addresses. My page has a MySQL
database that I could use to store the information between pings if that
helps. Is it possible to do what I'm after with the tools I have?

Any advice/tips/links?

Thanks -Ron
Jul 17 '05 #1
1 2057

"Ron Hiler" <rh****@rjcyberware.com> wrote in message
news:3f6a6bae$1@wobble...
Hi guys,

I'm a C++ programmer, and I have created a game which has a client/server
architecture. What I would like to do is have my web page show if the
server is up and how many people are logged in at the time. Every five
minutes or so, I'd like for the web page to ping for the server, and if the server is up, it should return a packet with the population number, which I can then display on the front page. If there is no response from the server (in, say, 5 seconds), then the page should show it as down.

Unfortunately, I'm a horrible php coder :) I can handle the server end code no problem, as long as I know what to send such that the php code can read
it. What I don't know is how to send the initial request from the web page to the server.

Both my web page and my server have fixed IP addresses. My page has a MySQL database that I could use to store the information between pings if that
helps. Is it possible to do what I'm after with the tools I have?

Any advice/tips/links?

Thanks -Ron


PHP is a server side meaning the client (web browser) has no access to it.
When a web page link is selected, or a page visited, the server works in the
background to give whatever results your PHP program specifies.

I would think that you need a javascript (or java) based solution for the
client side. To confirm if the server is available or not, you could
perform a test if an image exists or not on the remote server and use it as
a flag file with javascript, but I'm sure java must have some more flexable
and environmentally friendly solutions...
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Woojay Jeon | last post by:
OK, I tried a Google search on this Usenet group but couldn't find a solution, so I'm posting my question here (if there's a better archive than the one in Google, please let me know). Does...
1
by: sqlserver yeahbaby | last post by:
I can't seem to find a step-by-step guide to how to detect or continuously monitor for long-running queries that is suitable for a comparative SQL Server novice. I know that it is possible to...
7
by: Joecx | last post by:
Hi Does anyone have the code or maybe give me a start on how to detect if my program is already running if someone tries to run it again while it's already running? I know I could do this with a...
7
by: fox | last post by:
Maybe this is not the best group to ask this question, but I don't know a better one. I'm looking for a *portable* program in C (I mean source code) to detect whether unaligned word access is:...
2
by: Sam-Kiwi | last post by:
I've spent the last 6 months developing a pay-per-download website using ASP.NET Users purchase documents and then download them. The intention is that users are only charged for documents...
5
by: bill ramsay | last post by:
Hi I wonder if anyone can help me with a problem that I have with MSDE SQL db. . I have an app that runs on a server that communicates with remote devices using email, this and other similar...
9
by: timor.super | last post by:
Hi group, I've written a client/server application, using the dotnet sockets. In my server, I have a thread waiting for messages with : ret = currSocket.Receive(buffer, 1024,...
1
by: Steve | last post by:
Hi All I have a windows application (written in VB.net 2005) which I update via web downloads to my clients computers The downloaded file is saved in a subfolder until the next time the...
2
AaronL
by: AaronL | last post by:
Hello, Is there an API I can use to detect windows processes? For example, if I were to run notepad.exe, and I wanted to pop a message up in my program that said "notepad.exe" is running? How...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.