1

Is it possible to...

WolfTroop 1/26/14 9:41 pm
578
1/29/2014 2:29 pm
Connect your minecraft server stats to a website??
When ever the server is online the site will say its online
same for when its offline to

Reply Below
Posted by
WolfTroop
Level 6 : Apprentice Miner
4

  Have something to say?

JoinSign in

21

WolfTroop
01/29/2014 2:29 pm
Level 6 : Apprentice Miner
i want to make a custom online/offline one
1
WolfTroop
01/27/2014 7:51 pm
Level 6 : Apprentice Miner
HTML PLEASE
1
4377699683
01/27/2014 7:53 pm
Level 25 : Expert Network
<img src="http://edudek.org/jareds/jareds_etc/server-ping.php?ip=mcwolf.no-ip.org">

Like I said that is HTML just put it where you need it...

It is impossible to do it with just HTML.
1
4377699683
01/27/2014 6:05 pm
Level 25 : Expert Network
Here:

Just put this HTML on the page you need the status to be.

<img src="http://edudek.org/jareds/jareds_etc/server-ping.php?ip=mcwolf.no-ip.org">


I guess that is your IP. I saw it on your profile. If it isn't then just change it to be.

I saw you were on WIX so I knew you couldn't do PHP. Just add a HTML element to the page on the WIX editor.

It will look like this:

Online:


Offline:





For any PHP developers who want to see the code:
Here you go:

<?php


$url = 'http://api.iamphoenix.me/status/?server_ip='.$_GET["ip"];

$json = file_get_contents($url);
$ping = json_decode($json, TRUE);

$status = $ping['status'];

$online = "online.png";
$offline = "offline.png";

if($status == "true"){

$im = imagecreatefrompng($online);

$text_colour = imagecolorallocate( $my_img, 35, 217, 98 );

imagestring( $im, 4, 20, 1, "Online!",
$text_colour );

//echo "Online!";

}
else{

$im = imagecreatefrompng($offline);

$text_colour = imagecolorallocate( $my_img, 128, 128, 128);

imagestring( $im, 4, 20, 1, "Offline",
$text_colour );
//echo "Offline!";

}


header( "Content-type: image/png" );

imagepng($im);
imagedestroy($im);

?>
1
bmanrules
01/27/2014 7:57 pm
Level 57 : Grandmaster Programmer
Nice script!
1
WolfTroop
01/27/2014 7:55 pm
Level 6 : Apprentice Miner
yay
1
Starguy
01/27/2014 6:36 pm
Level 20 : Expert Ranger
whats the difference of the html version and the php version is the php more efficient or the same
1
4377699683
01/27/2014 6:39 pm
Level 25 : Expert Network
It is a PHP version. I have it making an image so it can be shown in an HTML img tag.

If he was able to run PHP himself then he could just put the code where he needed it. But my way doesn't require anything except for an HTML page.

If hew could run the PHP on his site I would definitely recommend that rather then using my way so it would load faster.
1
Starguy
01/27/2014 5:21 pm
Level 20 : Expert Ranger
make sure your website server supports php and mysql if not then we cant help
1
Area511
01/27/2014 5:16 pm
Level 23 : Expert System
I fear you;re gonna need professional help on this...
At least make sure your website server supports PHP, otherwise we can't help!
1
Austin_Craft_
01/27/2014 4:55 pm
Level 19 : Journeyman Dragon
@WolfTroop PHP is a coding language.
1
WolfTroop
01/27/2014 4:49 pm
Level 6 : Apprentice Miner
PMC a little help here?!??!?!
1
WolfTroop
01/27/2014 3:05 pm
Level 6 : Apprentice Miner
whats php?
1
Area511
01/27/2014 6:44 am
Level 23 : Expert System
program your page to ping your ip address on php {
if($online==true){

//Exeucte your code here:
}else{
echo "offline";
}

simple as that.
1
WolfTroop
01/27/2014 6:29 am
Level 6 : Apprentice Miner
ok
1
Paril
01/26/2014 9:52 pm
He/Him • Level 89 : Elite Scapegoat Programmer
Sure. We all use the same, open technology. It's an open packet format.

-P
1
WolfTroop
01/26/2014 9:55 pm
Level 6 : Apprentice Miner
Wasent Really Helpful But Allright

How do i do it PMC must know how to do it since they did it. -.-
1
spires33
01/26/2014 10:23 pm
Level 35 : Artisan Dwarf
i have no clue just all i know is pmc has it
1
WolfTroop
01/26/2014 9:49 pm
Level 6 : Apprentice Miner
i will send you the info
1
SnowyKaida
01/26/2014 9:46 pm
They/Them • Level 25 : Expert Artist Procrastinator
Doesn't it do it on here? Or any other server list. I think it does it on Enjin also :3.
1
WolfTroop
01/26/2014 9:49 pm
Level 6 : Apprentice Miner
On a custom site
1

Welcome