Activity Stream
48,167 MEMBERS
61092 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1.     
    #1
    Respected Developer
    Website's:
    X4B.org

    Default PHP UNRAR (good for rapidleech)

    A simple php rar extractor, made for Mr-R-T for rapidleech v22 trial 2 which doesnt have rar/unrar support yet. You can change the files dir with the first variable in the script. Not my best work, took 9 mins.

    PHP Code: 
    <?php
    /*
    Simple RAR Extractor


    If running in rapidleech you may also need to add
    <files rar.php>
    allow from all
    </files>
    to .htaccess
    */
    $dir 'files';

    if(
    $_POST['file']){
        
    $file = new WFile_rar($_POST['file']);
        
    $files $file->extract(array($_POST['password']));
        echo 
    'Extraction run<br /><br />';
    }

    echo 
    '<table>';
    $files scandir($dir);
    foreach(
    $files as $f){
        if(
    $f{0}!=='.'&&stripos($f,'.rar')){
            echo  
    '<tr><form action="rar.php" method="post"><input type="hidden" name="file" value="',$dir,'/',$f,'" /><td>',$f,'</td><td>Password: <input type="text" name="password" /></td><td><input type="submit" value="Extract" /></td></form></tr>';
        }
    }
    echo 
    '</table>';



    class 
    WFile_rar {
        public 
    $do = array('extract');
        public 
    $ext 'rar';
        private 
    $files = array();
        
        private function 
    _tdir($name) {
            global 
    $core;
            
    mkdir $file );
            if (! 
    chmod $file0777 ))
                die ( 
    'chmod() failed on file ' $file );
            
    clearstatcache ();
            if (
    is_writable $file ))
                return 
    $file//File is writable, continue
            
    $core->error 'File is not writable: ' $fileERR_ERROR );
            return 
    false;
        }

        private function 
    _extract($to,$pass=false) {
            if(
    $this->name){
                
    $password '-p-';
                if(
    $pass){
                    
    $password '-p'.escapeshellarg($pass);
                }
                
    exec('unrar e -o+ '.$password.' '.escapeshellarg($this->name).' '.$to.' 2>&1',$output);
                foreach(
    $output as $o){
                    if(
    strpos($o,'password incorrect')!==false||strpos($o,'CRC failed in')!==false){
                        return 
    'password';
                    }
                }
                
    //Archive extracted successfully
                
    $this->files scandir($to); //Get folder contents (extracted archive)
                
    return true;
            }
            return 
    false;
        }
        
        function 
    extract($passwords){
            global 
    $core;
            
    $password '';
            
    $to dirname($this->name);
            
    $ret $this->_extract($to);
            if(
    $ret==='password'){//RAR is passworded
                
    $password false;
                foreach(
    $passwords as $pass){
                    
    $r $this->_extract($to,$pass);
                    if(
    $r===true){
                        
    $password $pass;
                        break;
                    }
                }
            }
            if(
    $password===false&&$ret==='password'){
                die(
    'Password couldnt be guessed');
                return 
    false;
            }
            foreach(
    $this->files as $k=>$f){
                
    $this->files[$k] = $f;
            }
            if(
    $ret===true){//Most likely not passworded - else catch anyway
                
    return array(false,$this->files);
            }else if(
    trim($password)!==''){//Passworded
                
    return array(trim($password),$this->files);
            }
            return 
    false;
        }
        
        function 
    WFile_rar($name){
            
    $n pathinfo($name);
                
    $this->name $name;
        }
    }
    ?>
    SplitIce Reviewed by SplitIce on . PHP UNRAR (good for rapidleech) A simple php rar extractor, made for Mr-R-T for rapidleech v22 trial 2 which doesnt have rar/unrar support yet. You can change the files dir with the first variable in the script. Not my best work, took 9 mins. <?php /* Simple RAR Extractor If running in rapidleech you may also need to add <files rar.php> allow from all Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Nice work
    It's amazing, being in a community can cause hate. Competitors or not - DDOS isn't cool :)

  4.     
    #3
    Member
    thanks
    * :: Trusted Sellers:: jayfella ~ddpanda~ desiboy~~` ~~SmartzKool ~~ RippeR ~~ george101

  5.     
    #4
    Member
    Website's:
    RapidRisers.org
    Great Job SplitIce
    But Anyone tested this...does this work..?

  6.     
    #5
    Member
    looks good split
    Please follow signature rules

  7.     
    #6
    Member
    coolz

  8.     
    #7
    Respected Developer
    Website's:
    X4B.org
    It works btw me and Mr-R-T are using it. It does require that you have unrar installed on the server. Its made up of code out of some of my old projects.

  9.     
    #8
    Member
    Website's:
    nappz.net
    is this the same or a better version of the one included in most of the RL packs, lyk rev 41 Plus rar?
    $1 Header Text Link Adspots PM ME

  10.     
    #9
    Respected Developer
    Website's:
    X4B.org
    well it only does unrar, not rar. Its made for v22 that doesnt have rar/unarar yet (but you need for a couple plugins)

  11.     
    #10
    Member
    can this work without rpaidleech? hope you add more features

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. rar unrar in rapidleech
    By Gempis in forum Technical Help Desk Support
    Replies: 21
    Last Post: 21st Nov 2011, 07:56 AM
  2. Replies: 9
    Last Post: 3rd May 2011, 05:25 PM
  3. can't unrar on rapidleech
    By leonight in forum Technical Help Desk Support
    Replies: 12
    Last Post: 14th Jan 2011, 02:11 PM
  4. How to unrar in rapidleech..?
    By torrfriend in forum Technical Help Desk Support
    Replies: 1
    Last Post: 26th Dec 2010, 08:36 AM
  5. RapidLeech Unrar
    By Raven in forum Technical Help Desk Support
    Replies: 15
    Last Post: 3rd Jul 2010, 02:49 AM

Tags for this Thread

BE SOCIAL