It's true. But, I'm working on getting something up. Bare in mind I know almost 0 PHP. :biggrin.gif:
It takes about 6 lines of PHP if you're using the server IP. The function you need is fsockopen: http://uk2.php.net/fsockopen. If you want to do it the better way (based on a server url string) then you'll need to use cURL to grab the IP from the server page, this again is only a couple of lines. I built a site for this (minecraftservers.com) with a lot of extra stuff but never released it (as usual).
The simplest method for this to work is just to do (untested):
So you pass it: server IP, server port, online image (png) and offline image (png) and it returns the relevant image - it has a 1 second timeout for the connection. No idea if it works, not tested it, but that's the basic idea.
It's more work, but you could set up a cron job that checks every 30 minutes or so, to avoid making excessive requests to people's servers.
Why would you do this with Cron? That's pointless. The best method would be to use a cache, when the image is loaded you either load from cache if it was last updated less than 60 seconds ago or re-request. It would incredibly inefficient (and not to mention out of date) to do it with cron.
Port defaults to 25565, there are also on and off image options, but they default to the little green and red icons if you don't specify any images. ip is the only thing that needs to be changed, unless you're on a nonstandard port.
Enjoy, took like 4 minutes to get everything together. I wish I had seen citric's post earlier, I could have just copy-pasta'd.
Explanation for non-workingness:
Usually, with a DSL modem/router, every time you connect to the internet anew, you are assigned a different IP address. This indicator light will then look at your old IP for the presence of a minecraft game and come back empty.
Use a Dynamic DNS service like no-ip.com and you can get a domain which will always point to your current IP. You have to install some software, but it works well. For example, ste.zapto.org now always points to my current IP, so I use that for the Victory Clan light.
Hi, I was wondering, do you think you could explain in a little more detail how you did this? I've regitered with DynDNS.com. Thanks!
1.i would like a server with this
commands:
/newlvl creates level.
/builder {player name} makes player builder.
/adv builder {player name} makes player adv builder.
/op {player name} makes player op.
/superop {player name} superops player.
/operator {player name} make player operator.
/admin {player name} admins the player.
/staff {player name} makes player a staff.
/blb {block name it is like cuboid.
/blb 0 like z air.
/load {level name} loads created level.
/setspawn setspawn to were standing.
/derank {player name} {rank} takes person to lower rank.
/physics on turns physics on
/physics off turns physics off
/physics on adv turns physics on advanced.
/physics off adv turns advanced physics off
/activelava make lava active.
/activewater makes water active.
/count {number} counts down from a number.
/restore1 restores world your in.
/z door makes door.
/ban {player name} bans player.
/ip ban {player name} ip bans player.
/kick {player name} kicks player
/unban {player name} unbans player.
/kickban {player name} kickbans player.
/lava turns lava on and do /lava again for it to go off.
/water turns water on and do /water again for it to go off.
owner:chukky123
admins:rlhimhere,lenxaid
main world:flatgrass
all levels flatgrass.ground limit 40.max players 34.max connections 34.big main map huge.max levels 150.not private world public.server name.[kol]freebuild.message:welcome no griefing plz.
about my post that i wonted does anyone got a sever for me like that.and if they do i wont have to run it or will i.whoever finds one if they wont alpha for them or a nother account post quick reply telll that ur running server i will check then i will get them alpha.
How cool. It shows up briefly as a random ip losing connection when I post this, but other than that it seems to work.
everytime that image is loaded you'll get a connection that instantly drops. It's why this sort of image is so stupid, because it queries on every load when it doesn't need to.
How cool. It shows up briefly as a random ip losing connection when I post this, but other than that it seems to work.
everytime that image is loaded you'll get a connection that instantly drops. It's why this sort of image is so stupid, because it queries on every load when it doesn't need to.
EDIT: citricsquid, if you ever see this again, mind editing out the server status link out of your post? Im getting sick of the spam.
EDIT: Never mind, figured something out.
Oh :sad.gif:
Are there any other ways to do this without registering my server on that one site?
It takes about 6 lines of PHP if you're using the server IP. The function you need is fsockopen: http://uk2.php.net/fsockopen. If you want to do it the better way (based on a server url string) then you'll need to use cURL to grab the IP from the server page, this again is only a couple of lines. I built a site for this (minecraftservers.com) with a lot of extra stuff but never released it (as usual).
The simplest method for this to work is just to do (untested):
So you pass it: server IP, server port, online image (png) and offline image (png) and it returns the relevant image - it has a 1 second timeout for the connection. No idea if it works, not tested it, but that's the basic idea.
Why would you do this with Cron? That's pointless. The best method would be to use a cache, when the image is loaded you either load from cache if it was last updated less than 60 seconds ago or re-request. It would incredibly inefficient (and not to mention out of date) to do it with cron.
Port defaults to 25565, there are also on and off image options, but they default to the little green and red icons if you don't specify any images. ip is the only thing that needs to be changed, unless you're on a nonstandard port.
Enjoy, took like 4 minutes to get everything together. I wish I had seen citric's post earlier, I could have just copy-pasta'd.
&on=url&off=url
Nothing else has changed and the old url will still work for a while, until I get rid of it, which should be a while.
I wish I could read as well as you.
Hi, I was wondering, do you think you could explain in a little more detail how you did this? I've regitered with DynDNS.com. Thanks!
commands:
/newlvl creates level.
/builder {player name} makes player builder.
/adv builder {player name} makes player adv builder.
/op {player name} makes player op.
/superop {player name} superops player.
/operator {player name} make player operator.
/admin {player name} admins the player.
/staff {player name} makes player a staff.
/blb {block name it is like cuboid.
/blb 0 like z air.
/load {level name} loads created level.
/setspawn setspawn to were standing.
/derank {player name} {rank} takes person to lower rank.
/physics on turns physics on
/physics off turns physics off
/physics on adv turns physics on advanced.
/physics off adv turns advanced physics off
/activelava make lava active.
/activewater makes water active.
/count {number} counts down from a number.
/restore1 restores world your in.
/z door makes door.
/ban {player name} bans player.
/ip ban {player name} ip bans player.
/kick {player name} kicks player
/unban {player name} unbans player.
/kickban {player name} kickbans player.
/lava turns lava on and do /lava again for it to go off.
/water turns water on and do /water again for it to go off.
owner:chukky123
admins:rlhimhere,lenxaid
main world:flatgrass
all levels flatgrass.ground limit 40.max players 34.max connections 34.big main map huge.max levels 150.not private world public.server name.[kol]freebuild.message:welcome no griefing plz.
How cool. It shows up briefly as a random ip losing connection when I post this, but other than that it seems to work.
Totally New at running servers? Click me!
I wonder if sansavarous is online...
everytime that image is loaded you'll get a connection that instantly drops. It's why this sort of image is so stupid, because it queries on every load when it doesn't need to.
EDIT: citricsquid, if you ever see this again, mind editing out the server status link out of your post? Im getting sick of the spam.
EDIT: Never mind, figured something out.
Oh :sad.gif:
Are there any other ways to do this without registering my server on that one site?
Totally New at running servers? Click me!
I wonder if sansavarous is online...
Look -