Jump to content

testing


elementz

Recommended Posts

<?php
/***************************************************************************
*                              page_header.php
*                            -------------------
*   begin                : Saturday, Feb 13, 2001
*   copyright            : (C) 2001 The phpBB Group
*   email                : [email protected]
*
*   $Id: page_header.php,v 1.106.2.25 2005/10/30 15:17:14 acydburn Exp $
*
*
***************************************************************************/

/***************************************************************************
*
*   This program is free software; you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation; either version 2 of the License, or
*   (at your option) any later version.
*
***************************************************************************/

if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}

define('HEADER_INC', TRUE);


$timeout = 1;

$pvpgn = array(
    'check' => true,             // Should we check the status of the PvPGN server? (true or false)
    'ip' => '127.0.0.1',         // IP of the PvPGN server
    'port' => 6112,              // Port of the PvPGN server
);

$output = '';

if ($pvpgn['check']) {
    if ($fp = @fsockopen($pvpgn['ip'], $pvpgn['port'], $errno, $errstr, $timeout)) {
        fclose($fp);
        $output .= "<p>\n";
        $output .= "Diablo realm is <font color="#00FF00">online</font>\n";
        $output .= "</p>\n";
    } else {
        $output .= "<p>\n";
        $output .= "Diablo realm is <font color="#FF0000">offline</font>\n";
        $output .= "</p>\n";
    }
}

 

test

 

Link to comment
https://forums.phpfreaks.com/topic/56930-testing/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.