[REL] Working HTML & PHP Server Status Code

Page 1 of 2 12 LastLast
Results 1 to 25 of 29
  1. #1
    Newbie Juhnke is offline
    MemberRank
    Feb 2007 Join Date
    AustraliaLocation
    11Posts

    [REL] Working HTML & PHP Server Status Code

    Hey, I decided to make this server status thing :) And it works with PHP and HTML ^-^

    HTML Code (can only use default images):
    Code:
    <img src="http://www.habblissinc.com/junkyhotel/status.php?link=YOURIPHERE:YOURPORTHERE">
    PHP Code (can use your own images):
    Code:
    <?php
    //you can change these so they link to any image you want :)
    $live = "YOURONLINEIMAGE";
    $dead = "YOUROFFLINEIMAGE";
    
    list($addr,$port)= explode (':',"$link");
    if (empty($port)){
    $port = 90;//can change port to whatever
    }
    
    $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;
    }
    ?>
    Then put
    Code:
    <img src="http://www.yourdomain.com/status.php?link=YOURIPHERE&port=YOURPORTHERE">
    On your site

    Here is how to work the PHP one:
    1. Make a file called green.gif and change
    '$live = "YOURONLINEIMAGE";' to '$live = "http://yourdomain.com/green.gif";'
    2. Make a file called red.gif and change
    '$live = "YOURONLINEIMAGE";' to
    '$dead = "http://yourdomain.com/red.gif";'
    3. Upload
    4. Make a PHP File with a name like "status.php"
    5. Put the PHP Code into the PHP file
    6. Open the http://yourdomain.com/status.php
    7. Enter your IP where it says "YOURIPHERE
    8. Upload
    9. Put the:
    <img src="http://www.yourdomain.com/status.php?link=YOURIPHERE&port=YOURPORTHERE">
    onto a page where you want the server status to appear
    (like on your homepage or loader page)
    10. Start your server
    11. See if it works

    Here is how to work the PHP one:
    1. Open site you want to put it on
    2. Paste the code where it is going to appear for others
    3. Add it so it says <img src="http://habblissinc.com/junkyhotel/status.php?link=YOURIPHERE:YOURPORTHERE"> in the Source
    4. Start your server
    5. See if it works

    Example:
    Code:
    <?php
    //you can change these so they link to any image you want :)
    $live = "http://habblissinc.com/junkyhotel/green.gif";
    $dead = "http://habblissinc.com/junkyhotel/red.gif";
    
    list($addr,$port)= explode (':',"$link");
    if (empty($port)){
    $port = 90;//can change port to whatever
    }
    
    $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;
    }
    ?>
    goes onto a page called 'serverstatus.php' then on the page you want to display the server status have
    Code:
    <img src="http://www.habblissinc.com/junkyhotel/status.php?link=YOURIPHERE:YOURPORTHERE">
    Last edited by Juhnke; 25-10-07 at 09:05 AM.


  2. #2
    Sorcerer Supreme saddiqiqbal is offline
    Member +Rank
    Aug 2007 Join Date
    Germany >> HamburgLocation
    498Posts

    Cool Re: [REL] Working HTML & PHP Server Status Code

    Good Star for a Newbie! Welcome to RaGEZONE but you alread have 4 post :)))

    Regards
    saddiqiqbal :biggrinth:furious:

  3. #3
    Newbie Juhnke is offline
    MemberRank
    Feb 2007 Join Date
    AustraliaLocation
    11Posts

    Re: [REL] Working HTML & PHP Server Status Code

    Lol :P

  4. #4
    The Omega Superfun is offline
    Grand MasterRank
    Dec 2006 Join Date
    The NetherlandsLocation
    5,221Posts

    Re: [REL] Working HTML & PHP Server Status Code

    Hey, I decided to make this server status thing :)
    you fucking didn't made this,
    this whas released by the guy of habbo-cms.com

  5. #5
    Elite Member Scott is offline
    Member +Rank
    Sep 2007 Join Date
    BoltonLocation
    123Posts

    Re: [REL] Working HTML & PHP Server Status Code

    Thanks but why does it always say Offline :s

  6. #6
    Sorcerer Supreme fabianthebest is offline
    Member +Rank
    May 2007 Join Date
    Why do you guys ask this if i live nowhere :SLocation
    297Posts

    Re: [REL] Working HTML & PHP Server Status Code

    Very nice for a first class newbie :D

    Greetzz, Fab

  7. #7
    Moar skilled than befoar. AlexyGalaxy is offline
    Grand MasterRank
    Jan 2007 Join Date
    England, UKLocation
    1,394Posts

    Re: [REL] Working HTML & PHP Server Status Code

    Great :)

    Regards,
    Alex

  8. #8
    Grand Master The-Stupid-One is offline
    Grand MasterRank
    May 2007 Join Date
    United KingdomLocation
    778Posts

    Re: [REL] Working HTML & PHP Server Status Code

    Congratulations!!!

    Great Tutorial...
    You've won yourself a delicous cookie!

    Regards
    - Mark

  9. #9
    Grand Master The-Stupid-One is offline
    Grand MasterRank
    May 2007 Join Date
    United KingdomLocation
    778Posts

    Re: [REL] Working HTML & PHP Server Status Code

    I cant get it right...

  10. #10
    Newbie Juhnke is offline
    MemberRank
    Feb 2007 Join Date
    AustraliaLocation
    11Posts

    Re: [REL] Working HTML & PHP Server Status Code

    -eats cookie-

  11. #11
    Sorcerer Supreme .Extreme. is offline
    Member +Rank
    Jun 2007 Join Date
    United KingdomLocation
    416Posts

    Re: [REL] Working HTML & PHP Server Status Code

    good release

  12. #12
    Newbie Juhnke is offline
    MemberRank
    Feb 2007 Join Date
    AustraliaLocation
    11Posts

    Re: [REL] Working HTML & PHP Server Status Code

    thankyou ^^

  13. #13
    Sorcerer Supreme -Mike- is offline
    Member +Rank
    Apr 2007 Join Date
    338Posts

    Re: [REL] Working HTML & PHP Server Status Code

    I Get

    [code]
    Warning: Cannot modify header information - headers already sent by (output started at /home/habplus/public_html/advertise/status.php:1) in /home/habplus/public_html/advertise/status.php on line 23

  14. #14
    Newbie Juhnke is offline
    MemberRank
    Feb 2007 Join Date
    AustraliaLocation
    11Posts

    Re: [REL] Working HTML & PHP Server Status Code

    If the php one isn't working for u just use

    <img src="http://www.habblissinc.com/junkyhotel/status.php?link=YOURIPHERE&port=YOURPORTHERE">

    Where you want the server status to appear

  15. #15
    Grand Master Hebbo is offline
    Grand MasterRank
    Feb 2007 Join Date
    HabLog MotelLocation
    1,699Posts

    Re: [REL] Working HTML & PHP Server Status Code

    Don't work, it says evertime offline but the Hotel is online :S

  16. #16
    Newbie Juhnke is offline
    MemberRank
    Feb 2007 Join Date
    AustraliaLocation
    11Posts

    Re: [REL] Working HTML & PHP Server Status Code

    =\ it works for me =\

  17. #17
    The World Is Yours PixelPro is offline
    Grand MasterRank
    Jun 2007 Join Date
    UKLocation
    3,252Posts

    Re: [REL] Working HTML & PHP Server Status Code

    :S Wierd, not working for me + I put everything in the right section. Maybe fake.+ Juhnke stop spamming thread saying "eats cookie" PMSL.

  18. #18
    Sorcerer Supreme nuno.cards is offline
    Member +Rank
    Jun 2007 Join Date
    Home ^^Location
    322Posts

    Re: [REL] Working HTML & PHP Server Status Code

    Screens that is working please

  19. #19
    Elite Member joel. is offline
    Member +Rank
    Apr 2007 Join Date
    Australia, MelbLocation
    118Posts

    Re: [REL] Working HTML & PHP Server Status Code

    It does not make sence!

    1. Make a file called green.gif and change
    '$live = "YOURONLINEIMAGE";' to '$live = "http://yourdomain.com/green.gif";'

    Dose that mean change that and leave the rest of the code?

    <?php
    //you can change these so they link to any image you want :)
    $live = "YOURONLINEIMAGE";
    $dead = "YOUROFFLINEIMAGE";

    list($addr,$port)= explode (':',"$link");
    if (empty($port)){
    $port = 90;//can change port to whatever
    }

    $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;
    }
    ?>

  20. #20
    Newbie Juhnke is offline
    MemberRank
    Feb 2007 Join Date
    AustraliaLocation
    11Posts

    Re: [REL] Working HTML & PHP Server Status Code

    example:
    Code:
    <?php
    //you can change these so they link to any image you want :)
    $live = "http://habblissinc.com/junkyhotel/green.gif";
    $dead = "http://habblissinc.com/junkyhotel/red.gif";
    
    list($addr,$port)= explode (':',"$link");
    if (empty($port)){
    $port = 90;//can change port to whatever
    }
    
    $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;
    }
    ?>
    goes onto a page called 'serverstatus.php' then on the page you want to display the server status have
    Code:
    <img src="http://www.habblissinc.com/junkyhotel/status.php?link=YOURIPHERE:YOURPORTHERE">
    @PixelPro123

    I like spamming so, stop me!! >:]

  21. #21
    Sorcerer Supreme XXX. is offline
    Member +Rank
    Dec 2006 Join Date
    NetherlandsLocation
    445Posts

    Re: [REL] Working HTML & PHP Server Status Code

    It don't work by me..
    Its every time saying when I go to it..

    status.php

    Open / Save / Cancel

  22. #22
    Elite Member mja3131 is offline
    Member +Rank
    Feb 2007 Join Date
    120Posts

    Re: [REL] Working HTML & PHP Server Status Code

    i did it al but always say offline and when i do with your link it works :S can you give you source because when i try to ask the status it redirect to the image. ty

  23. #23
    Grand Master baybeecasi is offline
    Grand MasterRank
    Aug 2007 Join Date
    In ya mumz bedLocation
    1,500Posts

    Re: [REL] Working HTML & PHP Server Status Code

    thanks for release it works for me D

  24. #24
    Member tristanh is offline
    MemberRank
    Mar 2007 Join Date
    Where tha fuck u from? I'm from HOLLAND!Location
    83Posts

    Re: [REL] Working HTML & PHP Server Status Code

    lol... u doesn't make it -,-

    I believe that guy of habbo cms made this..

  25. #25
    Instanthost.org username is offline
    Grand MasterRank
    Oct 2007 Join Date
    Hull, EnglandLocation
    1,163Posts

    Re: [REL] Working HTML & PHP Server Status Code

    Very nice! Only one problem, its only best for Ham hotels as the owner will have to keep changing his ip!!!!!!!!!!!!!!!!!



Page 1 of 2 12 LastLast

Advertisement