Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 4 of 5 FirstFirst 12345 LastLast
Results 31 to 40 of 50
  1. #31
    Join Date
    May 2008
    Posts
    605
    Tokens
    0

    Default

    *Removed*



    Edited by ,Jess, (Forum Super Moderator): Please do not argue with other forum members.
    Last edited by ,Jess,; 06-09-2008 at 04:30 PM.

  2. #32
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    *Removed*



    Edited by ,Jess, (Forum Super Moderator): Please do not argue with other forum members.
    Last edited by ,Jess,; 06-09-2008 at 04:31 PM.

  3. #33
    Join Date
    Aug 2008
    Location
    Swindon, Wiltshire, Southwest
    Posts
    36
    Tokens
    5,569

    Latest Awards:

    Default

    OKAY YOU BOTH DONE I WANT COMMENTS ON MY SCRIPT PLEASEEE NO MORE TROLLING PLZ THX UZ XXXX

  4. #34
    Join Date
    Sep 2006
    Location
    Evanston, Illinois.
    Posts
    2,361
    Tokens
    0

    Latest Awards:

    Default

    Good script, could be much better with a few tweaks, like not using parenthesis in language constructs, but overall it's good.
    How could this hapen to meeeeeeeeeeeeeee?lol.

  5. #35
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by TheProtege View Post
    Okai ladies and gents, and little scripters (you 1337 *****)

    Here's some PHP & Lil Apache rewrite for you

    Basically, I got bored and coded this up. It allows people to hotlink for a period of time, say 1 minute, or 50 hours?

    Its not the best way to do it and could probably changed > alot <

    Heres the main part of it...

    PHP Code:
    <?php
    mysql_connect
    'localhost''dev_hotLink''hottie' ) or die( 'Error Mysql DB' );
    mysql_select_db'dev_hotLinks' );

    function 
    createImg$i )
    {
        
    $f = @file_get_contents$i );
        
    $iS imagecreatefromstring$f );
        
    header'content-type: image/png' );
        
    imagepng$iS );
        
    imagedestroy$iS );
    }

    function 
    hotLink$i$t$a )
    {
        if( 
    $i != '' && $t != '' )
        {
            if( 
    is_numeric$t ) )
            {
                
    $iS rand() . '-imageHotlink-' rand();
                if( 
    $q mysql_query'INSERT INTO `hotlinks` (`id`, `img`, `session`, `timeout`, `time`) VALUES (NULL, "' mysql_real_escape_string$i ) . '", "' $iS '", "' . ( $t 60 ) . '", "' time() . '");' ) )
                {
                    echo( 
    '<img src="images/' $iS '" alt="' $a '" />' );
                }
            }
            else
            {
                echo( 
    '<img src="error.jpg" alt="' $a '" />' );
            }
        }
        else
        {
            echo( 
    '<img src="error.jpg" alt="' $a '" />' );
        }
    }

    function 
    findImage$s )
    {
        if( 
    $s != '' )
        {
            if( 
    $q mysql_query'SELECT *  FROM `hotlinks` WHERE `session` = "' mysql_real_escape_string$s ) . '"' ) )
            {
                if( 
    mysql_num_rows$q ) >= )
                {
                    if( 
    $f mysql_fetch_array$q ) )
                    {
                        if( 
    abs( ( time() - $f'time' ] ) ) <= $f'timeout' ] )
                        {
                            
    createImg$f'img' ] );
                        }
                        else
                        {
                            
    mysql_query'DELETE FROM `hotlinks` WHERE `hotlinks`.`id` = "' $f'id' ] . '" LIMIT 1' );
                            
    createImg'hotlink.jpg' );
                        }
                    }
                }
                else
                {
                    
    createImg'hotlink.jpg' );
                }
            }
            else
            {
                
    createImg'error.jpg' );
            }
        }
        else
        {
            
    createImg'error.jpg' );
        }
    }
    ?>
    I'ma post the folder here, so you can see how it all works alltogether, if ur interested.

    Heres the SQL => http://dev.e-mx.co.uk/dev_hotLinks.sql
    Heres the ZIP => http://dev.e-mx.co.uk/hotlink.zip

    FLAME FLAME FLAME :eusa_danc

    xxxxxxx
    Protege
    Why do you have

    PHP Code:
    header'content-type: image/png' ); 
    when all the images are generated as .jpg?

    Quote Originally Posted by Hypertext View Post
    Good script, could be much better with a few tweaks, like not using parenthesis in language constructs, but overall it's good.
    Wow, when will you learn that using parenthesis is a preference, there is no "right or wrong" unless you're writing scripts for huge web sights, then there might be a benefit of not using them.
    Last edited by Jewish Bear; 06-09-2008 at 08:55 PM.


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  6. #36
    Join Date
    Aug 2008
    Location
    Swindon, Wiltshire, Southwest
    Posts
    36
    Tokens
    5,569

    Latest Awards:

    Default

    png is a better quality format.

  7. #37
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by TheProtege View Post
    png is a better quality format.
    Depends entirely on how you save the file.


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  8. #38
    Join Date
    Aug 2008
    Location
    Swindon, Wiltshire, Southwest
    Posts
    36
    Tokens
    5,569

    Latest Awards:

    Default

    aw ur so cute awwhh when u go serious, come here cuddly big teddy bear!!
    Last edited by TheProtege; 06-09-2008 at 09:57 PM.

  9. #39
    Join Date
    Sep 2006
    Location
    Evanston, Illinois.
    Posts
    2,361
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Jewish Bear View Post
    Wow, when will you learn that using parenthesis is a preference, there is no "right or wrong" unless you're writing scripts for huge web sights, then there might be a benefit of not using them.
    On php.net it actually says its bad. If your so worried I'm lying go find it.
    Quote Originally Posted by TheProtege View Post
    png is a better quality format.
    That totally depends on the image.
    How could this hapen to meeeeeeeeeeeeeee?lol.

  10. #40
    Join Date
    Aug 2008
    Location
    Swindon, Wiltshire, Southwest
    Posts
    36
    Tokens
    5,569

    Latest Awards:

    Default

    Quote Originally Posted by Hypertext View Post
    On php.net it actually says its bad. If your so worried I'm lying go find it.

    That totally depends on the image.
    Jpeg -> A compression technique for color images that can reduce files sizes to about 5% of their normal size. Some detail is lost in the compression.



Page 4 of 5 FirstFirst 12345 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •