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

Results 1 to 5 of 5
  1.     
    #1
    Respected Developer
    Website's:
    X4B.org

    Default Another one of my infamous code snippets

    Ok, I wont post the full snippet because not many people need to extract group name and release type and the code isnt that great for that part.

    Class: SceneName
    Description: Parses the scene format for TV Shows. Persumes that the source follows the correct nameing structure.

    PHP Code: 
    <?
    /*
    Class: SceneName
    Description: Parses the scene format for TV Shows. Persumes that the source follows the correct nameing structure.

    written by splitice (thewarezscene.org)
    */

    class SceneName {
        private 
    $text '';
        private 
    $parsed = array();
        
        private function 
    _parse(){
            
    $p explode('.',$this->text);
            
    $season = array();
            
    $name '';
            foreach(
    $p as $v){
                if(
    $v{0}=='S'&&$v{3}=='E'){//Season Number Episode Number
                    
    $season['season'] = (int)($v{1}.$v{2});
                    
    $season['episode'] = (int)($v{4}.$v{5});
                }else if(
    $v{0}=='S'){ //Just season
                    
    $season['season'] = (int)($v{1}.$v{2});
                }else{
                    if(
    $season){
                        
                    }else{
                        if(
    $name$name.= ' ';
                        
    $name.=$v;
                    }
                }
            }
            if(!
    $season){
                
    trigger_error('SceneName: cant recognise season');
                return 
    false;
            }
            if(!
    $name){
                
    trigger_error('SceneName: cant recognise show name');
                return 
    false;
            }
            
            
    $this->parsed = array('name'=>$name,'show'=>$season);
        }
        
        function 
    name(){
            if(!
    $this->parsed$this->_parse();
            
            return 
    $this->parsed['name'];
        }
        
        function 
    show(){
            if(!
    $this->parsed$this->_parse();
            
            return 
    $this->parsed['show'];
        }
        
        function 
    SceneName($text){
            
    $this->text $text;
        }
        
        function 
    __toString(){
            return 
    $this->text;
        }
    }

    ?>
    SplitIce Reviewed by SplitIce on . Another one of my infamous code snippets Ok, I wont post the full snippet because not many people need to extract group name and release type and the code isnt that great for that part. Class: SceneName Description: Parses the scene format for TV Shows. Persumes that the source follows the correct nameing structure. <? /* Class: SceneName Description: Parses the scene format for TV Shows. Persumes that the source follows the correct nameing structure. Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    zomgbbqpizza.com evilddl.com scenemarket.org
    Thanks for sharing

  4.     
    #3
    Member
    good share
    Please follow signature rules

  5.     
    #4
    (╯?□?)╯︵ ┻━┻
    Website's:
    Xenu.ws WarezLinkers.com SerialSurf.com CracksDirect.com
    infamous implies that it is famous for being bad.
    but its not famous either, maybe "useful" would be a better word lol.

    Anyway good snippet, just fooling around.
    Projects:
    WCDDL - The Professional DDL Script
    Top Secret Project: In Development - ZOMG
    ImgTrack - Never Have Dead Images Again!

  6.     
    #5
    Respected Developer
    Website's:
    X4B.org
    Well its becoming something that i do regularly so becoming infamous.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 3rd Jan 2012, 02:55 PM
  2. Replies: 1
    Last Post: 27th Aug 2011, 01:45 PM
  3. Infographic: 25 Infamous Computer Viruses In 25 Years
    By b1u3eyes in forum General Discussion
    Replies: 9
    Last Post: 17th May 2011, 06:19 PM
  4. Snippets & Random Crap (Linkify text links included)
    By JmZ in forum Web Development Area
    Replies: 0
    Last Post: 9th Apr 2011, 05:34 AM
  5. Replies: 0
    Last Post: 28th Dec 2009, 10:06 AM

Tags for this Thread

BE SOCIAL