Activity Stream
48,167 MEMBERS
6805 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 14
  1.     
    #1
    (╯?□?)╯︵ ┻━┻
    Website's:
    Xenu.ws WarezLinkers.com SerialSurf.com CracksDirect.com

    Default 04:33 10/11/2010

    Code: 
    <?php
        class JString {
            private $string = "";
        
            public function __construct($str) {
                $this->string = $str;
            }
            
            public function uri($sep='-') {
                return trim(preg_replace('#[^\w\-]+#', $sep, $this->string), $sep);
            }
            
            public function uc() {
                return ucwords($this->string);
            }
            
            public function truncate($len=15) {
                return strlen($this->string) > $len ? substr($this->string, 0, $len) . '...' : $this->string;
            }
            
            public function advtrunc($words=10, $len=NULL) {
                if(strpos($this->string, ' ') === false) {
                    if(empty($len))
                        return $this->string;
                    else
                        return strlen($this->string) > $len ? substr($this->string, 0, $len) . '...' : $this->string;
                }
                if(str_word_count($this->string) <= $words)
                    return $this->string;
                $estring = explode(' ', $this->string);
                return implode(' ', array_slice($estring, 0, $words)) . '...';
            }
        }
        
        // Testing
        echo '<pre>';
            $jmz = new JString('so its like 4:30am here and i figured id throw up some random code for the public for once, who knows who will use it.');
        var_dump($jmz->uri());
        var_dump($jmz->uc());
        var_dump($jmz->truncate());
        var_dump($jmz->advtrunc());
        echo '</pre>';
    ?>
    


    EDIT:

    FYI...
    uri() - Format the string so it is safe for use in an SEO URI
    uc() - Upper case the first letter of each word
    truncate() - ... the string if it is too long
    advtrunc() - ... the string and/or remove words if there are too many words or it is too long
    JmZ Reviewed by JmZ on . 04:33 10/11/2010 <?php class JString { private $string = ""; public function __construct($str) { $this->string = $str; } public function uri($sep='-') { return trim(preg_replace('#+#', $sep, $this->string), $sep); Rating: 5
    Projects:
    WCDDL - The Professional DDL Script
    Top Secret Project: In Development - ZOMG
    ImgTrack - Never Have Dead Images Again!

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    WRZhost.com WExplain.com
    echo "too wasted to use this";
    Any questions? Want to make money?My Online Marketing Forum
    WRZhost offshore hosting! Still the best offshore hosting after 7 years! Hongkong,Russia,NL,Germany

  4.     
    #3
    Just Another Coder
    Output??

  5.     
    #4
    (╯?□?)╯︵ ┻━┻
    Website's:
    Xenu.ws WarezLinkers.com SerialSurf.com CracksDirect.com
    Output:
    string(117) "so-its-like-4-30am-here-and-i-figured-id-throw-up-some-random-code-for-the-public-for-once--who-knows-who-will-use-it"
    string(118) "So Its Like 4:30am Here And I Figured Id Throw Up Some Random Code For The Public For Once, Who Knows Who Will Use It."
    string(18) "so its like 4:3..."
    string(49) "so its like 4:30am here and i figured id throw..."
    Projects:
    WCDDL - The Professional DDL Script
    Top Secret Project: In Development - ZOMG
    ImgTrack - Never Have Dead Images Again!

  6.     
    #5
    Just Another Coder
    yea exactly thats what i said in the chatbox!! Atlast i got something to learn now here in php... awesome JmZ

  7.     
    #6
    Respected Developer
    Website's:
    wrzc.org
    It's a nice and simple class. Useful and slightly more efficient to what I currently have.

    This sorta work deserves the coder rank
    Tutorial How to SEO your Warez Site a guide to help you increase your organic traffic

    Huge list of Warez Sites and free Multiposter Templates

  8.     
    #7
    Banned
    Website's:
    KWWHunction.com
    I agree JmZ should be a coder for this type of work

  9.     
    #8
    Member
    Website's:
    servedome.com
    Quote Originally Posted by Mr Happy View Post
    It's a nice and simple class. Useful and slightly more efficient to what I currently have.

    This sorta work deserves the coder rank
    Quote Originally Posted by DLow View Post
    I agree JmZ should be a coder for this type of work
    I swear he was coder rank before.
    ServeDome Internet Services - Providing reliable & affordable hosting solutions

    Available payment options - Major Credit Cards / Debit Cards, PayPal, MoneyBookers, AlertPay and Liberty Reserve

  10.     
    #9
    Member
    he was respected coder before

  11.     
    #10
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    He was a coder, if i recall correct btw he wasted it by being dis-respectful to staff an members in cb...

    So jus cos he posted some smart ass php code, doesnt mean he deserves it bk.

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. Best Of 2010
    By Mr.Bean in forum General Discussion
    Replies: 23
    Last Post: 23rd Dec 2010, 09:31 AM
  2. Warezscene 2010
    By FilipBonJovi in forum General Discussion
    Replies: 58
    Last Post: 23rd Aug 2010, 08:26 PM
  3. R5 DVD Release Dates (May 2010 ? November 2010)
    By xfernanx in forum News & Current Events
    Replies: 16
    Last Post: 5th Jun 2010, 05:01 AM
  4. 2010 sucks :/
    By iKnow in forum General Discussion
    Replies: 39
    Last Post: 7th Jan 2010, 07:04 AM
  5. [WTS]RapidShare- 22 Jan 2010
    By RKing in forum Completed Transactions
    Replies: 9
    Last Post: 10th Nov 2009, 01:45 PM

Tags for this Thread

BE SOCIAL