You are Unregistered, please register to gain Full access.
    


RaGEZONE sponsored advertisment:

 
 
LinkBack (1) Thread Tools
Old 12-17-2008   1 links from elsewhere to this Post. Click to view. #1 (permalink)
Member
 
Yusufnoor's Avatar
 
Rank: Hobbit
Join Date: May 2008
Posts: 43
Thanked 0 Times in 0 Posts

Talking [TUT]How to make your own server status[TUT]

Your Ad Here
Hi im gonna let you see how to make your own server status with your own images

First you need a basic php
Code:
<?php
$live = "ONLINE IMAGE";
$dead = "OFFLINE IMAGE";


$server = $_GET['server'].":";
$s_server = str_replace("::", ":", $server);
list($addr,$port)= explode (':',"$s_server");
if (empty($port)){
    $port = 90;
}
$churl = @fsockopen(server($addr), $port, $errno, $errstr, 20);
             if (!$churl){
               header("Location: $dead");
                }
             else {
                   header("Location: $live");             
          }
function server($addr){
         if(strstr($addr,"/")){$addr = substr($addr, 0, strpos($addr, "/"));}
         return $addr;
}
?>
Ok now change some things

Change ONLINE IMAGE with an image link that you hosted like this
Code:
http://klabbohotel1.woelmuis.nl/on.png
And change OFFLINE IMAGE with your offline image like this
Code:
http://klabbohotel1.woelmuis.nl/off.png
Then host your php like on 110mb or woelmuis.nl for the dutch people

ok now we go to the html part

You need this code
Code:
{Hotel name} is now :<img src="PHP LINK HERE?dns=IP HERE&port=PORT HERE&style=13" border="0" /></a>!
Change some things here:

PHP LINK HERE with the link where's the php that you hosted

IP HERE the ip of your hotel there

PORT HERE the port of your hotel there

Now you have to put the code on your site in html

and you will see it works

That was my tut!

Thx
__________________
Gratis domein en hosting!
Yusufnoor is offline   Reply With Quote

RaGEZONE sponsored advertisment:
Old 12-17-2008   #2 (permalink)
It pays to be obvious
 
Neroez's Avatar
 
Rank: Member +
Join Date: Nov 2008
Location: The Netherlands
Posts: 841
Thanked 0 Times in 0 Posts

Re: [TUT]How to make your own server status[TUT]

Not a tutorial, just a little release.
This should be moved.
Neroez is offline   Reply With Quote

Endorsement
Old 12-17-2008   #3 (permalink)
Member
 
Yusufnoor's Avatar
 
Rank: Hobbit
Join Date: May 2008
Posts: 43
Thanked 0 Times in 0 Posts

Re: [TUT]How to make your own server status[TUT]

Its no release but it wasnt done by accident.
Now its done
__________________
Gratis domein en hosting!
Yusufnoor is offline   Reply With Quote

Endorsement

Old 12-21-2008   #4 (permalink)
Yey, my title is enabled!
 
Rank: Member +
Join Date: Oct 2008
Location: In my room
Posts: 250
Thanked 0 Times in 0 Posts

Re: [TUT]How to make your own server status[TUT]

The online/offline image doesn't show up, even if my server is online/offline!
iAwesome is offline   Reply With Quote
Old 12-22-2008   #5 (permalink)
It pays to be obvious
 
Neroez's Avatar
 
Rank: Member +
Join Date: Nov 2008
Location: The Netherlands
Posts: 841
Thanked 0 Times in 0 Posts

Re: [TUT]How to make your own server status[TUT]

Originally Posted by iAwesome View Post
The online/offline image doesn't show up, even if my server is online/offline!
Change this with your current code:
Code:
<?php
$live = "http://i253.photobucket.com/albums/hh46/casjebasje/on.png";
$dead = "http://i253.photobucket.com/albums/hh46/casjebasje/off.png";


$server = $_GET['server'].":";
$s_server = str_replace("::", ":", $server);
list($addr,$port)= explode (':',"$s_server");
if (empty($port)){
    $port = 90;
}
$churl = @fsockopen(server($addr), $port, $errno, $errstr, 20);
             if (!$churl){
               header("Location: $dead");
                }
             else {
                   header("Location: $live");             
          }
function server($addr){
         if(strstr($addr,"/")){$addr = substr($addr, 0, strpos($addr, "/"));}
         return $addr;
}
?>
Neroez is offline   Reply With Quote
Old 12-23-2008   #6 (permalink)
Yey, my title is enabled!
 
Rank: Member +
Join Date: Oct 2008
Location: In my room
Posts: 250
Thanked 0 Times in 0 Posts

Re: [TUT]How to make your own server status[TUT]

Originally Posted by Neroez View Post
Change this with your current code:
Code:
<?php
$live = "http://i253.photobucket.com/albums/hh46/casjebasje/on.png";
$dead = "http://i253.photobucket.com/albums/hh46/casjebasje/off.png";


$server = $_GET['server'].":";
$s_server = str_replace("::", ":", $server);
list($addr,$port)= explode (':',"$s_server");
if (empty($port)){
    $port = 90;
}
$churl = @fsockopen(server($addr), $port, $errno, $errstr, 20);
             if (!$churl){
               header("Location: $dead");
                }
             else {
                   header("Location: $live");             
          }
function server($addr){
         if(strstr($addr,"/")){$addr = substr($addr, 0, strpos($addr, "/"));}
         return $addr;
}
?>
Do I have to have the PHP-code and the HTML-code in the same website? Or do I have to use the PHP-code in one, and the HTML-code in another site?
iAwesome is offline   Reply With Quote
Old 07-04-2009   #7 (permalink)
Newbie
 
Mbangel4's Avatar
 
Rank: Hobbit
Join Date: Jun 2007
Location: Texas
Posts: 14
Thanked 0 Times in 0 Posts

Re: [TUT]How to make your own server status[TUT]

Thanks, helped me.
__________________
Mbangel4 is offline   Reply With Quote
Old 07-04-2009   #8 (permalink)
RaGEZONER
 
HealthCard's Avatar
 
Rank: Hobbit
Join Date: Sep 2008
Posts: 83
Thanked 0 Times in 0 Posts

Re: [TUT]How to make your own server status[TUT]

is this for holo flat file or both? please state
__________________
c4n4d14nb01@hotmail.com
Add me on msn or email me if you need help with your retro ( Holo Servers Only )
HealthCard is offline   Reply With Quote
 

Bookmarks

Thread Tools


LinkBacks (?)
LinkBack to this Thread: http://forum.ragezone.com/f335/tut-how-to-make-your-own-server-status-tut-512298/
Posted By For Type Date
Habbo Tutorials [Archive] - RaGEZONE - MMORPG server development forums This thread Refback 08-02-2009 05:20 PM



Translated by Google
Albanian Arabic Belarusian Bulgarian Catalan Chinese Croatian Czech Danish Dutch English Estonian Filipino Finnish French Galician German Greek Hebrew Hindi Hungarian Icelandic Indonesian Italian Japanese Korean Latvian Lithuanian Maltese Norwegian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swedish Taiwanese Thai Turkish Ukrainian Vietnamese
no new posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274