• 21-01-2014, 20:29:20
    #1
    Merhaba değerli r10 üyeleri, Bir süredir php tabanlı lgsl formatında yazdığım referans listemi yayınlıyordum. Ancak hosting değişikliği nedeniyle sitemi başka bir firmaya taşıdım. Şuana kadar iki adet yer değişikliği yaptık ancak sorunum çözülmedi malesef. Referans listem bazen açılıyor ama genel olarak bakıldığında %80 civarında line 58 hatası alıyorum. Bunun kaynağı ne olabilir ve nasıl çözebilirim. Php hakkında geniş bilgiye sahip arkadaşların yardımcı olmasını rica ederim. Teşekkürler.

    http://81.22.98.185/referans/
  • 21-01-2014, 21:14:51
    #2
    Kodlari görebilirsek yardım etmek daha rahat olur.
  • 21-01-2014, 21:23:39
    #3
    Buyrun flashla ilgili kod dizinini gönderiyorum.




    </div> <div class="ortasayfacercevesi">
    
    <div class="flashalani"><script type="text/javascript">AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','892','height','203','movie','assets/swf/smart-banner' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="892" height="203"><param name="movie" value="assets/swf/smart-banner.swf" /></object></noscript></div>
    <div class="sayfagovdesi">
      
    <div class="solmenugenel"> {include file="$template/solmenu.tpl"}</div><div class="sergi">

    Flash fotoğraflarımın adresleri

    81.22.98.185/assets/images/1.jpg
    81.22.98.185/assets/images/2.jpg
    81.22.98.185/assets/images/3.jpg
    81.22.98.185/assets/images/4.jpg
  • 21-01-2014, 21:29:06
    #4
    Bunlar nedir hocam. Php kodlardan bahsediyorum ben.
    conquer adlı üyeden alıntı: mesajı görüntüle
    Buyrun flashla ilgili kod dizinini gönderiyorum.




    </div> <div class="ortasayfacercevesi">
    
    <div class="flashalani"><script type="text/javascript">AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','892','height','203','movie','assets/swf/smart-banner' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="892" height="203"><param name="movie" value="assets/swf/smart-banner.swf" /></object></noscript></div>
    <div class="sayfagovdesi">
      
    <div class="solmenugenel"> {include file="$template/solmenu.tpl"}</div><div class="sergi">

    Flash fotoğraflarımın adresleri

    81.22.98.185/assets/images/1.jpg
    81.22.98.185/assets/images/2.jpg
    81.22.98.185/assets/images/3.jpg
    81.22.98.185/assets/images/4.jpg
  • 21-01-2014, 21:46:14
    #5
    Afedersiniz yanlış kod göndermişim Buyrun.

    <?PHP
     
    /**
     * @author      Par0noid Solutions <par0noid@gmx.de>
     * @package     ts3admin
     * @version     0.6.6
     * @copyright   Copyright (c) 2009-2012, Stefan Z.
     * @link        http://ts3admin.info
     * @link        http://par0noid.info
    **/
    class ts3admin {
     
            private $runtime = array('socket' => '', 'selected' => false, 'host' => '', 'queryport' => '27010', 'timeout' => 2, 'debug' => array(), 'fileSocket' => '');
     
            function channelList($params = '') {
                    if(!$this->runtime['selected']) { return $this->checkSelected(); }
                    if(!empty($params)) { $params = ' '.$params; }
                   
                    return $this->getData('multi', 'channellist'.$params);
            }
     
            function clientInfo($clid) {
                    if(!$this->runtime['selected']) { return $this->checkSelected(); }
                    return $this->getData('array', 'clientinfo clid='.$clid);
            }
     
     
            function clientList($params = '') {
                    if(!$this->runtime['selected']) { return $this->checkSelected(); }
                   
                    if(!empty($params)) { $params = ' '.$params; }
                   
                    return $this->getData('multi', 'clientlist'.$params);
            }
     
            function selectServer($value, $type = 'port', $virtual = false) {
                    if(in_array($type, array('port', 'serverId'))) {
                            if($type == 'port') {
                                    if($virtual) { $virtual = ' -virtual'; }else{ $virtual = ''; }
                                    $res = $this->getData('boolean', 'use port='.$value.$virtual);
                                    if($res['success']) {
                                            $this->runtime['selected'] = true;
                                    }
                                    return $res;
                            }else{
                                    $res = $this->getData('boolean', 'use sid='.$value);
                                    if($res['success']) {
                                            $this->runtime['selected'] = true;
                                    }
                                    return $res;
                            }
                    }else{
                            return $this->generateOutput(false, array('Error: wrong value type'), false);
                    }
            }
     
            function serverInfo() {
                    if(!$this->runtime['selected']) { return $this->checkSelected(); }
                    return $this->getData('array', 'serverinfo');
            }
     
            function __construct($host, $queryport, $timeout = 2) {
                    if($queryport >= 1 and $queryport <= 65536) {
                            if($timeout >= 1) {
                                    $this->runtime['host'] = $host;
                                    $this->runtime['queryport'] = $queryport;
                                    $this->runtime['timeout'] = $timeout;
                            }else{
                            }
                    }else{
                    }
            }
     
            private function isConnected() {
                    if(empty($this->runtime['socket'])) {
                            return false;
                    }else{
                            return true;
                    }
            }
     
            private function generateOutput($success, $errors, $data) {
                    return array('success' => $success, 'errors' => $errors, 'data' => $data);
            }
     
            private function unEscapeText($text) {
                    $escapedChars = array("\t", "\v", "\r", "\n", "\f", "\s", "\p", "\/");
                    $unEscapedChars = array('', '', '', '', '', ' ', '|', '/');
                    $text = str_replace($escapedChars, $unEscapedChars, $text);
                    return $text;
            }
     
            public function connect() {
                    if($this->isConnected()) {
                            return $this->generateOutput(false, array('Error: the script is already connected!'), false);
                    }
                    $socket = @fsockopen($this->runtime['host'], $this->runtime['queryport'], $errnum, $errstr, $this->runtime['timeout']);
     
                    if(!$socket) {
                            return $this->generateOutput(false, array('Error: connection failed!', 'Server returns: '.$errstr), false);
                    }else{
                            if(strpos(fgets($socket), 'TS3') !== false) {
                                    $tmpVar = fgets($socket);
                                    $this->runtime['socket'] = $socket;
                                    return $this->generateOutput(true, array(), true);
                            }else{
                                    return $this->generateOutput(false, array('Error: host isn\'t a ts3 instance!'), false);
                            }
                    }
            }
     
            private function executeCommand($command, $tracert) {
                    if(!$this->isConnected()) {
                            return $this->generateOutput(false, array('Error: script isn\'t connected to server'), false);
                    }
                   
                    $data = '';
     
                   
                    $splittedCommand = str_split($command, 1024);
                   
                    $splittedCommand[(count($splittedCommand) - 1)] .= "\n";
                   
                    foreach($splittedCommand as $commandPart) {
                            fputs($this->runtime['socket'], $commandPart);
                    }
     
                    do {
                            $data .= fgets($this->runtime['socket'], 4096);
                           
                            if(strpos($data, 'error id=3329 msg=connection') !== false) {
                                    $this->runtime['socket'] = '';
                                    return $this->generateOutput(false, array('You got banned from server. Connection closed.'), false);
                            }
                           
                    } while(strpos($data, 'msg=') === false or strpos($data, 'error id=') === false);
     
                    if(strpos($data, 'error id=0 msg=ok') === false) {
                            $splittedResponse = explode('error id=', $data);
                            $chooseEnd = count($splittedResponse) - 1;
                           
                            $cutIdAndMsg = explode(' msg=', $splittedResponse[$chooseEnd]);
                           
                           
                            return $this->generateOutput(false, array('ErrorID: '.$cutIdAndMsg[0].' | Message: '.$this->unEscapeText($cutIdAndMsg[1])), false);
                    }else{
                            return $this->generateOutput(true, array(), $data);
                    }
            }
     
            private function getData($mode, $command) {
           
                    $validModes = array('boolean', 'array', 'multi', 'plain');
           
                    if(!in_array($mode, $validModes)) {
                            return $this->generateOutput(false, array('Error: '.$mode.' is an invalid mode'), false);
                    }
                   
                    if(empty($command)) {
                            return $this->generateOutput(false, array('Error: you have to enter a command'), false);
                    }
                   
                    $fetchData = $this->executeCommand($command, debug_backtrace());
                   
                   
                    $fetchData['data'] = str_replace(array('error id=0 msg=ok', chr('01')), '', $fetchData['data']);
                   
                   
                    if($fetchData['success']) {
                            if($mode == 'boolean') {
                                    return $this->generateOutput(true, array(), true);
                            }
                           
                            if($mode == 'array') {
                                    if(empty($fetchData['data'])) { return $this->generateOutput(true, array(), array()); }
                                    $datasets = explode(' ', $fetchData['data']);
                                   
                                    $output = array();
                                   
                                    foreach($datasets as $dataset) {
                                            $dataset = explode('=', $dataset);
                                           
                                            if(count($dataset) > 2) {
                                                    for($i = 2; $i < count($dataset); $i++) {
                                                            $dataset[1] .= '='.$dataset[$i];
                                                    }
                                                    $output[$this->unEscapeText($dataset[0])] = $this->unEscapeText($dataset[1]);
                                            }else{
                                                    if(count($dataset) == 1) {
                                                            $output[$this->unEscapeText($dataset[0])] = '';
                                                    }else{
                                                            $output[$this->unEscapeText($dataset[0])] = $this->unEscapeText($dataset[1]);
                                                    }
                                                   
                                            }
                                    }
                                    return $this->generateOutput(true, array(), $output);
                            }
                            if($mode == 'multi') {
                                    if(empty($fetchData['data'])) { return $this->generateOutput(true, array(), array()); }
                                    $datasets = explode('|', $fetchData['data']);
                                   
                                    $output = array();
                                   
                                    foreach($datasets as $datablock) {
                                            $datablock = explode(' ', $datablock);
                                           
                                            $tmpArray = array();
                                           
                                            foreach($datablock as $dataset) {
                                                    $dataset = explode('=', $dataset);
                                                    if(count($dataset) > 2) {
                                                            for($i = 2; $i < count($dataset); $i++) {
                                                                    $dataset[1] .= '='.$dataset[$i];
                                                            }
                                                            $tmpArray[$this->unEscapeText($dataset[0])] = $this->unEscapeText($dataset[1]);
                                                    }else{
                                                            if(count($dataset) == 1) {
                                                                    $tmpArray[$this->unEscapeText($dataset[0])] = '';
                                                            }else{
                                                                    $tmpArray[$this->unEscapeText($dataset[0])] = $this->unEscapeText($dataset[1]);
                                                            }
                                                    }                                      
                                            }
                                            $output[] = $tmpArray;
                                    }
                                    return $this->generateOutput(true, array(), $output);
                            }
                            if($mode == 'plain') {
                                    return $fetchData;
                            }
                    }else{
                            return $this->generateOutput(false, $fetchData['errors'], false);
                    }
            }
    }
     
    ?>
  • 21-01-2014, 22:46:36
    #6
    Dosya eksik ya da checkSelected fonksiyonu class içinde tanımlanmamış
  • 21-01-2014, 22:56:05
    #7
    Ancak bunu bazen açıyor bir süre sonra line 58 hatası veriyor. Önceki sistemimde sorunsuz calısıyor yeni sistemde calıstıramadım
  • 21-01-2014, 23:08:01
    #8
    conquer adlı üyeden alıntı: mesajı görüntüle
    Ancak bunu bazen açıyor bir süre sonra line 58 hatası veriyor. Önceki sistemimde sorunsuz calısıyor yeni sistemde calıstıramadım
    http://ts3admin.info/index.php?page=downloads

    şurada güncel versiyonu var class'in onu deneyin dilerseniz. checkSelected fonksiyonu tanımlanmış orada.
  • 21-01-2014, 23:15:10
    #9
    LaCReMeL adlı üyeden alıntı: mesajı görüntüle
    http://ts3admin.info/index.php?page=downloads

    şurada güncel versiyonu var class'in onu deneyin dilerseniz. checkSelected fonksiyonu tanımlanmış orada.
    Çok teşekkür ederim problem giderildi. Konu kilitlenebilir.