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 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: I got bored

  1. #1
    Join Date
    Aug 2006
    Location
    Wakefield, West Yorkshire
    Posts
    1,351
    Tokens
    0

    Latest Awards:

    Default I got bored

    So i thought id put an image hosting script up. http://imagehosting.rarehabbo.co.uk its a freely downloadable script that i edited a bit. Enjoy!

  2. #2
    Join Date
    Dec 2006
    Location
    Doncaster, UK
    Posts
    4,244
    Tokens
    0

    Latest Awards:

    Default

    Adding a banner and bg doesn't count as editing it lol
    A collection of forum users' views on obesity
    Quote Originally Posted by mynameisjake View Post
    sounds good
    Quote Originally Posted by Stephen View Post
    Just google it.
    Quote Originally Posted by jesus View Post
    jesus christ
    Quote Originally Posted by Alexicles. View Post
    It will probably soon go away.

  3. #3
    Join Date
    Aug 2006
    Location
    Wakefield, West Yorkshire
    Posts
    1,351
    Tokens
    0

    Latest Awards:

    Default

    lol i edited basic.php cos when u copied the img tag, it would return the thumbnail and not the proper image so i edited it so its the proper image. I also removed the url tag bit. i also changed the title

  4. #4
    Join Date
    Jan 2007
    Posts
    790
    Tokens
    3,429

    Latest Awards:

    Default

    I like script +rep
    Last edited by Isolde; 18-02-2007 at 04:23 PM.

  5. #5
    Join Date
    Aug 2006
    Location
    Wakefield, West Yorkshire
    Posts
    1,351
    Tokens
    0

    Latest Awards:

    Default

    www.imagehoster.6x.to click download :]. If u want the edited basic.php file here it is:
    PHP Code:
    <?
    // --------------------- (C) 2006 by TPAX --------------------- //
    // ------- PLEASE DO NOT REMOVE MY (C) FROM THE SCRIPT -------- // 
    // ------------------------- THANX :) ------------------------- //

    include "config.php";

    if (!isset(
    $_FILES['userfile'])) exit;
    if (
    is_uploaded_file($_FILES['userfile']['tmp_name'])) {
    if (
    $_FILES['userfile']['size']>$max_size

        echo 
    "<font color=\"#333333\" face=\"Geneva, Arial, Helvetica, sans-serif\">File is too big !</font><br>\n"; exit; 
    }

    if ((
    $_FILES['userfile']['type']=="image/gif") || ($_FILES['userfile']['type']=="image/pjpeg") || ($_FILES['userfile']['type']=="image/jpeg") || ($_FILES['userfile']['type']=="image/png")) 
    {

    // generate random signs
    $zufall rand(1,9);
    $zufall2 rand(1,26);
    $buchstaben = array(     "1" => "arx",
                    
    "2" => "opt",
                    
    "3" => "bwy",
                    
    "4" => "cqs",
                    
    "5" => "viu",
                    
    "6" => "rgh",
                    
    "7" => "jdv",
                    
    "8" => "klz",
                    
    "9" => "bfi", );

    $buchstaben2 = array(    "1" => "a",
                    
    "2" => "b",
                    
    "3" => "c",
                    
    "4" => "d",
                    
    "5" => "e",
                    
    "6" => "f",
                    
    "7" => "g",
                    
    "8" => "h",
                    
    "9" => "i",
                    
    "10" => "j",
                    
    "11" => "k",
                    
    "12" => "l",
                    
    "13" => "m",
                    
    "14" => "n",
                    
    "15" => "o",
                    
    "16" => "p",
                    
    "17" => "q",
                    
    "18" => "r",
                    
    "19" => "s",
                    
    "20" => "t",
                    
    "21" => "u",
                    
    "22" => "v",
                    
    "23" => "w",
                    
    "24" => "x",
                    
    "25" => "y",
                    
    "26" => "z", );

    $unikat $buchstaben[$zufall] . time() . $buchstaben2[$zufall2];

    // upload progress
    $file $_FILES['userfile']['name'];
    $new_bild $unikat.substr($filestrrpos($file"."));
    $res move_uploaded_file($_FILES['userfile']['tmp_name'], "./" $path $new_bild);

    if (!
    $res

        echo 
    "<font color=\"#333333\" face=\"Geneva, Arial, Helvetica, sans-serif\">Didn't work, please try again</font><br>\n"; exit; 


    else 
    {
    ?>
    <br>
    <?

    //set url variables
    $imgf $new_bild;
    $thbf $tpath.$imgf;
    $urlf 'http://' .$domain .'/' .$path .$imgf;

    //create thumbnails
    function createthumb($name,$filename,$new_w,$new_h)
    {
    $system=explode('.',$name);

    if (
    preg_match('/jpg|jpeg|JPG/',$system[1]))
    {
        
    $src_img=imagecreatefromjpeg($name);
    }

    if (
    preg_match('/png|PNG/',$system[1]))
    {
        
    $src_img=imagecreatefrompng($name);
    }

    if (
    preg_match('/gif|GIF/',$system[1]))
    {
        
    $src_img=imagecreatefromgif($name);
    }

    $old_x=imageSX($src_img);
    $old_y=imageSY($src_img);

    if (
    $old_x $old_y
    {
        
    $thumb_w=$new_w;
        
    $thumb_h=$old_y*($new_h/$old_x);
    }

    if (
    $old_x $old_y
    {
        
    $thumb_w=$old_x*($new_w/$old_y);
        
    $thumb_h=$new_h;
    }

    if (
    $old_x == $old_y
    {
        
    $thumb_w=$new_w;
        
    $thumb_h=$new_h;
    }

    $dst_img=ImageCreateTrueColor($thumb_w,$thumb_h);
    imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y); 

    if (
    preg_match("/png/",$system[1]))
    {
        
    imagepng($dst_img,$filename); 

    if (
    preg_match("/gif/",$system[1]))
    {
        
    imagegif($dst_img,$filename);
    }

    else 
    {
        
    imagejpeg($dst_img,$filename); 
    }

    imagedestroy($dst_img); 
    imagedestroy($src_img); 

    }

    createthumb($path.$imgf,$tpath.$imgf,$tsize,$tsize);
    ?>
    <head>
    <script type="text/javascript">
    <!--
    function highlight(field)
        {
        field.focus();
        field.select();
        }
    //-->
    </script>
    <title>Rare Habbo Image hosting</title>
    </head>
    <body bgcolor="#272f80" background='background.gif'>
    <center>
    <table border='0' bgcolor='white'>
    <link rel="STYLESHEET" type="text/css" href="style.css">
    <FORM action="nowhere" method="post">
    <center>
    <tr><td>URL:</td><td><input type="text" name="thetext" onClick='highlight(this);' size="60" value="<? echo 'http://' .$domain .'/' ?>viewer.php?id=<? echo $imgf?>"></td></tr>
    <tr><td>DIRECT URL:</td><td><input type="text" name="thetext" onClick='highlight(this);' size="60" value="<? echo $urlf?>"></td></tr>
    <tr><td>HTML:</td><td><input type="text" name="thetext" onClick='highlight(this);' size="60" value='<a href="<? echo 'http://' .$domain .'/'?>viewer.php?id=<? echo $imgf?>"><img src="<? echo 'http://' .$domain.'/'.$tpath.$imgf?>" border="0"></a>'></td></tr>
    <tr><td>BBCode:</td><td><input type="text" name="thetext" onClick='highlight(this);' size="60" value="[IMG]<? echo $urlf?>[/IMG]"></td></tr>
    <tr><td>IMAGE:</td><td><a href='viewer.php?id=<? echo $imgf?>'><img src='<? echo $thbf ?>'></a></td></tr>

    <?
    }


    else 

    echo 
    "<font color=\"#333333\" face=\"Geneva, Arial, Helvetica, sans-serif\">You selected a wrong filetype!</font><br>\n"; exit; 
    }

    }

    if (
    $tsize <= 380
    {
        echo 
    "</table>";
        echo 
    "<table border='0' bgcolor='white' width='457'>";
        echo 
    "<tr><td><center><a href='./index.php'>back</a></td></tr>";
        echo 
    "</table>";
        echo 
    "<br><br>";
        echo 
    "</body>";
    }
    ?>

  6. #6
    Join Date
    Jan 2007
    Posts
    790
    Tokens
    3,429

    Latest Awards:

    Default

    Thanks. =] Whats the difference then the current basic anmd this one?

  7. #7
    Join Date
    Aug 2006
    Location
    Wakefield, West Yorkshire
    Posts
    1,351
    Tokens
    0

    Latest Awards:

    Default

    the current basic in the bbcode box returns the url tag and the img tag returns thumbnail I edited it so it returns the proper image in just the [img] tag

  8. #8
    Join Date
    Jan 2007
    Posts
    790
    Tokens
    3,429

    Latest Awards:

    Default

    okay. i see. thanks =]

    i'll recommend your site for the helpful soruce.

  9. #9

    Default

    downloaded that ages ago, forgot about it though

  10. #10
    Join Date
    Jan 2007
    Posts
    790
    Tokens
    3,429

    Latest Awards:

    Default

    I got a problem.

    When i upload i get a message.
    http://www.host.direct-hosts.net/upload/index.php

    Any ideas?

Page 1 of 2 12 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
  •