+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: New Server Status Img

  1. #1
    Brandon's Avatar
    Brandon is offline Former Senior Account Rep Brandon is on a distinguished road
    Join Date
    Jun 2006
    Location
    Tewksbury, MA
    Posts
    9,589

    New Server Status Img

    Well I had nothing better to do, and I wanted a server status image so how does it look



    I myself give it a 6/10, took me about 10 mins to do, but it works.

    Whats your rating/improvments I could make.
    Thanks,
    Brandon Long

  2. #2
    Trixter is offline x10 Lieutenant Trixter is an unknown quantity at this point
    Join Date
    Oct 2006
    Posts
    384

    Re: New Server Status Img

    could you tell me how to making one of those?
    Current:

    Latest:



  3. #3
    Brandon's Avatar
    Brandon is offline Former Senior Account Rep Brandon is on a distinguished road
    Join Date
    Jun 2006
    Location
    Tewksbury, MA
    Posts
    9,589

    Re: New Server Status Img

    Quote Originally Posted by Trixter
    could you tell me how to making one of those?
    Ya ill write something up later
    Thanks,
    Brandon Long

  4. #4
    Trixter is offline x10 Lieutenant Trixter is an unknown quantity at this point
    Join Date
    Oct 2006
    Posts
    384

    Re: New Server Status Img

    thanks :D
    Current:

    Latest:



  5. #5
    Zenax's Avatar
    Zenax is offline Lord Of The Keys Zenax is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    The Brilliant United Kingdom
    Posts
    1,339

    Re: New Server Status Img

    Yeah I would like to know too. Perhaps you should posta tutorial on it, if there isn't one already!

    BTW: 7/10

    Good looking, perhaps make the "Designed By Brandon" text smaller, so that it fits in easier.
    Last edited by Zenax; 11-13-2006 at 04:36 AM.
    Regards,
    Zenax

  6. #6
    Brandon's Avatar
    Brandon is offline Former Senior Account Rep Brandon is on a distinguished road
    Join Date
    Jun 2006
    Location
    Tewksbury, MA
    Posts
    9,589

    Re: New Server Status Img

    Here is the code I have.

    PHP Code:
    <?php
    //------------------------------------------------------------------------
    // PHP Enviromental's
    ini_set('display_errors','0');
    // PHP Enviromental's
    //------------------------------------------------------------------------
    // Check Port Function
    function checkPort($ipAddress$port) {
          
    $handle = @fsockopen($ipAddress$port$errno$errstr,2);
          if (
    $handle == false) {
             return 
    false;
          }
          else {
             return 
    true;
          }
       }
    // Check Port Function
    header("Content-type: image/png");
    $background imagecreatefrompng('dfsafda98yf9yh9FDHG9DSHG9hgfdsgs.png');
    $white imagecolorallocate($background255255255);
    $green imagecolorallocate($background0640);
    $red imagecolorallocate($background255124121);
    $black imagecolorallocate($background255255255);
    imagettftext($background1003056$green'arial.ttf''64.92.165.74');
    // HTTP Only port 80
    $status =  checkPort('64.92.165.74'80);
       if (
    $status == true) {
          
    $data 'Online';
          
    $color $green;
       }
       else {
          
    $data 'Offline';
          
    $color $red;
       }

     
    // Checks the port
    imagettftext($background1004769$color'arial.ttf'$data);
    // HTTP Only port 80
    // CPANEL Only port 2082
    $status =  checkPort('64.92.165.74'2082);
       if (
    $status == true) {
          
    $data 'Online';
          
    $color $green;
       }
       else {
          
    $data 'Offline';
          
    $color $red;
       }
    imagettftext($background10064135$color'arial.ttf'$data);
    //------------------------------------------------------------------------
    // DNS Only port 53 
     // Checks the status of port 53
    $status =  checkPort('64.92.165.74'53);
       if (
    $status == true) {
          
    $data 'Online';
          
    $color $green;
       }
       else {
          
    $data 'Offline';
          
    $color $red;
       }
     
    // Checks the status of port 53

     //Writes the output
    imagettftext($background10038122$color'arial.ttf'$data);
     
    //Writes the output
    // DNS Only port 53
    //------------------------------------------------------------------------
     // Checks the status of port 21
    $status =  checkPort('64.92.165.74'21);
       if (
    $status == true) {
          
    $data 'Online';
          
    $color $green;
       }
       else {
          
    $data 'Offline';
          
    $color $red;
       }
     
    // Checks the status of port 21

     // Writes the output
    imagettftext($background1003995$color'arial.ttf'$data);
     
    // Writes the output
    // FTP Only port 21
    //------------------------------------------------------------------------
    // MySQL Only port  3306
    $status =  checkPort('64.92.165.74'3306);
       if (
    $status == true) {
          
    $data 'Online';
          
    $color $green;
       }
       else {
          
    $data 'Offline';
          
    $color $red;
       }

    imagettftext($background10055109$color'arial.ttf'$data);
    // MySQL Only port  3306

    //------------------------------------------------------------------------
    // HTTPS Only port  443

     // Checks the status of port 21
    $status =  checkPort('64.92.165.74'443);
       if (
    $status == true) {
          
    $data 'Online';
          
    $color $green;
       }
       else {
          
    $data 'Offline';
          
    $color $red;
       }
     
    // Checks the status of port 21


    imagettftext($background1005481$color'arial.ttf'$data);
    // HTTPS Only port  443


    //Makes and breaks the image
    imagepng($background);
    imagedestroy($background);
    //Makes and breaks the image

    ?>
    THats what I have.


    imagettftext($background, 10, 0, 54, 81, $color, 'arial.ttf', $data);

    that sets the x,y value were you can move it.

    arial.ttf this is the font, to get a font copy it out of c:/windows/fonts/ to your destop and upoad it.

    Edit: Ill work on a better one later, but i g2 take a shower and go to school
    Last edited by Brandon; 11-13-2006 at 04:39 AM.
    Thanks,
    Brandon Long

  7. #7
    Fedlerner's Avatar
    Fedlerner is offline Retired Fedlerner is an unknown quantity at this point
    Join Date
    Aug 2006
    Location
    Buenos Aires, Argentina
    Posts
    12,923

    Re: New Server Status Img

    Nice one man.
    I like it, but the "Designed by Brandon" is cutted. I mean the "g" and the "y" are cutted.
    Federico Lerner
    Former x10Hosting Administrator - Staff Manager

  8. #8
    Brandon's Avatar
    Brandon is offline Former Senior Account Rep Brandon is on a distinguished road
    Join Date
    Jun 2006
    Location
    Tewksbury, MA
    Posts
    9,589

    Re: New Server Status Img

    Quote Originally Posted by fedlerner
    Nice one man.
    I like it, but the "Designed by Brandon" is cutted. I mean the "g" and the "y" are cutted.
    ty, but like it said it was a quicky, im working on that extemded tutorial now, and should be ready in about 1-2 hours.
    Thanks,
    Brandon Long

  9. #9
    Chris Z's Avatar
    Chris Z is offline x10 Spammer Chris Z is an unknown quantity at this point
    Join Date
    Sep 2005
    Location
    Alabama, USA
    Posts
    2,802

    Re: New Server Status Img

    sweet, i can't wait for it
    -Chris Z
    Retired Account Manager


  10. #10
    Trixter is offline x10 Lieutenant Trixter is an unknown quantity at this point
    Join Date
    Oct 2006
    Posts
    384

    Re: New Server Status Img

    Nice, i definetly want that tutorial! ;D
    Current:

    Latest:



+ Reply to Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 11-04-2006, 06:49 PM
  2. snapshot server status
    By dotrock in forum Free Hosting
    Replies: 3
    Last Post: 10-13-2005, 02:26 AM
  3. server status from x10hosting
    By Mikek in forum Feedback and Suggestions
    Replies: 11
    Last Post: 09-26-2005, 01:17 PM
  4. Uploading Error
    By Burak in forum Free Hosting
    Replies: 7
    Last Post: 08-17-2005, 12:27 PM
  5. PHP Server Status.
    By Nathan in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 07-12-2005, 08:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers