The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Pinging a Server - Need Help
I am working with scratch here. I've been searching these forums all day and I can't seem to make any sense of what I'm finding. I'm going insane here.
I just want something very simple. I want to be able to display the status of my server on the forum somewhere, anywhere. I don't care. I can move things around rather easily. I'm just struggling creating it. Anyways, what I want to do is ping my computer here and home to show whether or not it is connected to the internet. I run a private gaming server for my friends and I to play on, but it'd be nice if they knew whether or not it was up and running before they tried logging in. If the computer is turned on, the server is turned on. Could someone either build me something or point me toward something SIMPLE. All I want to do is see if the thing's turned on. I am interested in placing the status in my header. $ping = ping yarub's server; $status = $ping; Obviously that's not accurate, but you get my idea. Please help me. =( |
#2
|
||||
|
||||
use a pinging script that will give you the output, then use the hooks and plugin system as instructed in the vBulletin manual and insert the code into your template
|
#3
|
||||
|
||||
That's the point. I can't find one that's simple enough for my mind to understand. =\
|
#4
|
||||
|
||||
|
#5
|
||||
|
||||
That's the one I was trying. Could you possible help me make a plugin that would make it work? >_> 'Cause it's not working.
|
#6
|
|||
|
|||
<a href="http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=8&txtCodeId=1786" target="_blank">http://www.planet-source-code.com/vb...txtCodeId=1786</a>
|
#7
|
||||
|
||||
So if it doesn't connect to the server, it prints out a million lines of error. That's not what I'm looking for. I want something simple. There's got to be an easier way to do this.
Server is Offline Server if Online That's all I want in the end. EDIT: Maybe I'm asking for the wrong thing. I don't want to ping anything. I just want to see if the darn thing is connected to the internet. That's all I want. |
#8
|
||||
|
||||
PHP Code:
|
#9
|
|||
|
|||
Have a look at http://www.greycube.com/ and check out LGSL, not sure if it's what you're looking for, but it checks if game servers are up and can show stats for them too like players, maps, settings etc. It generally outputs a list of game servers which you specify by IP, but if you plan on making a small menu for just one game server you can easily redo the layout for a small menu.
|
#10
|
|||
|
|||
Does your local server run a web server of any description and if not is it possible to install one?
If yes, then there is a much easier solution.... Create a "server is online" image and put it on your local webserver, for example: http://mylocalwebserver.dyndns.com/online.gif Then create a "server is offline" image and put it on your internet/forum server, for example: http://www.myinternetforum.com/offline.gif Once you have the two images, you would then use javascript to attempt to load the "online.gif" image from your local server and if not possible it displays the "offline.gif" from the internet server. Job done EDIT: I did this for a project a few years ago, I will see if I can dig out the JS for it. No promises though EDIT: Found it: Code:
<html> <head> </head> <body> <img name="serverStatusImage" src="checking.gif" alt="Checking Server Status..."> <script type="text/javascript"> <!-- function SetOnlineStatus() { document["serverStatusImage"].src = onlineImageSrc; document["serverStatusImage"].alt = 'Server Online'; } function SetOfflineStatus() { document["serverStatusImage"].src = offlineImageSrc; document["serverStatusImage"].alt = 'Server Offline'; } var onlineImageSrc = 'http://www.google.co.uk/images/nav_logo3.png' var offlineImageSrc = 'http://www.myinternetsite.com/offline.gif' var onlineImage = new Image(); onlineImage.onload = SetOnlineStatus; onlineImage.onerror = SetOfflineStatus; onlineImage.src = onlineImageSrc; //--> </script> </body> </html> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|