ANTICHAT.XYZ    VIDEO.ANTICHAT.XYZ    НОВЫЕ СООБЩЕНИЯ    ФОРУМ  
Баннер 1   Баннер 2
Antichat снова доступен.
Форум Antichat (Античат) возвращается и снова открыт для пользователей. Здесь обсуждаются безопасность, программирование, технологии и многое другое. Сообщество снова собирается вместе.
Новый адрес: forum.antichat.xyz
Вернуться   Форум АНТИЧАТ > Программирование > PHP, PERL, MySQL, JavaScript
   
 
 
Опции темы Поиск в этой теме Опции просмотра

код вставки изображения
  #1  
Старый 17.05.2008, 21:55
Аватар для mixdw
mixdw
Познающий
Регистрация: 27.03.2008
Сообщений: 80
Провел на форуме:
322368

Репутация: 44
По умолчанию код вставки изображения

Собственно,есть мониторинг сервера контры,он встроен в изображение.
Суть моей ситуации такая.Хочу в мониторинг добавить строку,что выводил ещё карты игры из какой-то дирриктории.Изображения в формате .jpg.
Пробовал сам,но без результатно...

Вот ещё не знаю в какой файл пхп всовывать строку...
Однин файл:
PHP код:
<?
require_once("class_PQ.php");
$height=80;
$width=300;
$path="C:/xampp/htdocs/cs/mon1/"// путь до картинки))
$image="cs.png";

Header("Content-type: image/png");
$im=imagecreatefrompng($path.$image);
$black ImageColorAllocate($im0,0,0);
$white ImageColorAllocate($im255,255,255);
imageFill($im00$white);

$pqinfo = array();
$pq PQ::create(array('ip' => "10.3.145.2:27015"'querytype' => "halflife_new_queries",));
$pqinfo $pq->query(array('players','info''rules'));


ImageString($im212010$pqinfo['name'], $black);
ImageString($im212025"IP: ".$pqinfo['ip'].":".$pqinfo['int_port'], $black);
ImageString($im212040"Map: ".$pqinfo['map'], $black);
ImageString($im212055"Player: ".$pqinfo['totalplayers']."/".$pqinfo['maxplayers'], $black);

ImageRectangle($im00$width-1$height-1$black);
Imagejpeg($im);
ImageDestroy($im);
?>
И ещё один:
PHP код:
<?php
Error_Reporting
(E_ALL & ~E_NOTICE);
/********

    Main PsychoQuery Factory class. This returns a new PQ object based on the type of server you intend to query.
    This is the only file you need to 'include' into your applications. The PQ directory must be somewhere in your
    'include_path'.

    Example:

        include("class_PQ.php");

        $pq = PQ::create($conf);
        print_r($pq->query_info('10.3.145.2:27015'));

********/

if (defined("CLASS_PQ_PHP")) return 1;
define("CLASS_PQ_PHP"1);

include_once(
"PQ/PQ_PARENT.php");

class 
PQ {

// Our factory method to create a valid object for our querytype specified
function &create($conf) {
    if (!
is_array($conf)) {            // force $conf into an array.
        
$ip $conf;            // If $conf is not an array it's assumed to be an ipaddr[:port]
        
$conf = array( 'ip' => $ip );
        unset(
$ip);
    }

    
// Add defaults to the config. Defaults do not override values passed in the $conf array
    
$conf += array(
        
'ip'        => '',
        
'port'        => '',
        
'querytype'    => 'halflife',
        
'master'    => 0,
        
'timeout'    => 3,
        
'retries'    => 1,
    );

    
// Separate IP:Port if needed
    
if (strpos($conf['ip'], ':') !== FALSE) {
        
$ipport $conf['ip'];
        list(
$conf['ip'], $conf['port']) = explode(':'$ipport2);
        if (!
is_numeric($conf['port'])) {
            
$conf['port'] = '';
        }
    } else {
        
$conf['port'] = '';        // default to no port (will be determined later in the query process)
    
}

    
// If no 'querytype' is specified default to 'halflife'
    
if (!$conf['querytype']) {
        
$conf['querytype'] = 'halflife';
    }
    
// Attempt to load the proper class for our specified 'querytype'.
    
$filename strtolower($conf['querytype']);
    
      
$class "PQ_" $filename;

    if (!include_once(
"PQ/" $filename ".php")) {
        
trigger_error("Unsupported 'querytype' specified (${conf['querytype']}) for new PQ object"E_USER_ERROR);
    } else {
        return new 
$class($conf);
    }
}

}  
// end of class PQ

Но это не все,есть ещё папка PQ.
Но там видимо только выполняется считывание инфы,я так думаю...

Если не достаточно объяснил ситуацию,извеняйте.
 
Ответить с цитированием
 



Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Маскировка вируса SuNDowN Мировые новости 5 07.05.2008 08:32
как взломать домофон ReZiDeNT Аппаратное обеспечение 5 11.01.2008 17:03
Секреты Gsm КероСиН Сотовый фрикинг 17 30.08.2007 21:01



Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 


Быстрый переход




ANTICHAT.XYZ