Php Class : Php Binary to Text

  < ? 
     function bin2text($bin_str) 
     { 
       $text_str = ''; 
       $chars = explode("\n", chunk_split(str_replace("\n", '', $bin_str), 8)); 
       $_I = count($chars); 
       for($i = 0; $i < $_I; $text_str .= chr(bindec($chars[$i])), $i ); 
       return $text_str; 
     } 
     function text2bin($txt_str) 
     { 
       $len = strlen($txt_str); 
       $bin = ''; 
       for($i = 0; $i < $len; $i ) 
       { 
         $bin .= strlen(decbin(ord($txt_str[$i]))) < 8 ? str_pad(decbin(ord($txt_str[$i])), 8, 0, STR_PAD_LEFT) : decbin(ord($txt_str[$i])); 
       } 
       return $bin; 
     } 
     print text2bin('How are you gentlements?'); 
  ? >

Php Class : Php Dizi Ekleme (Array Insertion)

Php Class : Php Dizi Ekleme (Array Insertion)

class arrayAll 
  { 
     var $startError = 'Warning:Check your input parameters'; 
     var $endError = ''; 
     function Insert($array = '', $position = '' , $elements= '') 
     { 
       if ($position == '' || $array == '' || $elements == '' || $position < 1 || $position > count($array)+1) 
       { 
         echo $this->startError . "insert".$this->endError; 
       } 
       else 
       { 
         $left = array_slice ($array, 0, $position+1); 
         $right = array_slice ($array, $position+1,count($array)); 
         for($i=1; $i< COUNT($elements) ; $i++) 
         { 
           $insert[$i] .= $elements[$i] ; 
         } 
         $array = array_merge ($left, $insert, $right); 
         // echo " Left Count : " . COUNT($left) . "
\n"; 
         // echo " Insert Count : " . COUNT($insert) . "
\n"; 
         // echo " Right Count : " . COUNT($right) . "
\n"; 
         unset($left, $right, $insert); 
       } 
       unset ($position, $elements); 
       return $array ; 
     } 
  }

Php Class : Formdaki gizli (hidden) veriyi almak için php sınıfı

A class to put get and post variables in hidden form

< ? php 
     class c_HiddenVars 
     { 
       function display($a) 
       { 
         $c = Count($a); 
         for ($i = 0, Reset($a); $i < $c; $i++, Next($a)) 
         { 
           $k = Key($a); $v = $a[$k]; 
           if (is_array($v)) 
           { 
             $vc = Count($v); 
             for (Reset($v), $vi = 0; $vi < $vc; $vi++, Next($v)) 
             { 
               $vk = Key($v); 
               echo "< input type=hidden name=\"$k\[$vk\]\" value=\"".htmlspecialchars($v [$vk]). "\">\n"; 
             } 
           } 
           else 
           { 
             echo "< input type=hidden name=\"$k\" value=\"".htmlspecialchars($v). "\">\n"; 
           } 
         } 
       } 
   
       function get() 
       { 
         global $HTTP_GET_VARS; 
         if (is_array($HTTP_GET_VARS)) 
         { 
           $this->display 
           ($HTTP_GET_VARS); 
         } 
       } 
       function post() 
       { 
         global $HTTP_POST_VARS; 
         if (is_array($HTTP_POST_VARS)) 
         { 
           $this->display 
           ($HTTP_POST_VARS); 
         } 
       } 
       function all() 
       { 
         $this->get(); 
         $this->post(); 
       } 
     }; 
   ?>