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 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Join Date
    Mar 2007
    Posts
    31
    Tokens
    0

    Default

    Quote Originally Posted by Drompo View Post
    PHP Code:
     <?
    // Script Made By Ashley Cusack
    // CONFIG
    $serverpath "upload/";   // Path to where images should be upload the server.
    $urltoimages "http://youngfm.co.uk/uploader/upload";  // Web address to where the images are accessible from.
    $maxsize "500000";     // Example - 20000 is the same as 20kb
    $uniq uniqid("");
    // CONFIG END

    $mode $_GET['mode'];
    if (
    $mode == "") { $mode "form"; }

    if (
    $mode == "form") {
    echo 
    "<form enctype='multipart/form-data' method='post' action='?mode=upload'>\n";
    echo 
    "Upload file: <input type='file' name='file'>\n";
    echo 
    "<br><input type='submit' name='Submit' value='Upload'>\n";
    echo 
    "<br>Maximum File Size: $maxsizeb Bytes";
    echo 
    "<br>$file";
    }

    if (
    $mode == "upload") {
    $file $_FILES['file']['name'];
    $name time() . substr($file, -4);
     
    // If you add your own file types don't forget to add an uppercase version.
     
    $allowedfiles[] = "gif";
     
    $allowedfiles[] = "jpg";
     
    $allowedfiles[] = "jpeg";
     
    $allowedfiles[] = "jfef";
     
    $allowedfiles[] = "jpe";
     
    $allowedfiles[] = "png";
     
    $allowedfiles[] = "GIF";
     
    $allowedfiles[] = "JPG";
     
    $allowedfiles[] = "JPEG";
     
    $allowedfiles[] = "JFEF";
     
    $allowedfiles[] = "JPE";
     
    $allowedfiles[] = "PNG";
     
    $allowedfiles[] = "PDF";
     
    $allowedfiles[] = "pdf";
     
    $allowedfiles[] = "PSD";
     
    $allowedfiles[] = "psd";
     
    $allowedfiles[] = "bmp";
     
    $allowedfiles[] = "BMP";
     
    $allowedfiles[] = "tif";
     
    $allowedfiles[] = "tiff";
     
    $allowedfiles[] = "TIF";
     
    $allowedfiles[] = "TIFF";
     
    $allowedfiles[] = "dib";
     
    $allowedfiles[] = "DIB";


     if(
    $_FILES['file']['size'] > $maxsize)
     {
      print 
    "File size is too big - please reduce file size and try again.";
      }
      else {
      
    $path "$serverpath/" $name;
      foreach(
    $allowedfiles as $allowedfile) {
     
      if (
    $done <> "yes") {
      if (
    file_exists($path)) {
       echo 
    "A file with this name already exists - please rename the file and reupload.";
       exit;
      }
      }
     
      if (
    substr($file, -3) == $allowedfile) {
        
    move_uploaded_file($_FILES['file']['tmp_name'], "$path");
        
    $done "yes";
        echo 
    "<p>Your image has been successfully uploaded to our server and can be accessed using the URL provided below.</p>";
        echo 
    "<p><img src='$urltoimages/$name' border='0'>"
        echo 
    "<p>Direct Link: <input name='direct' type='text' size='75' value='$urltoimages/$name'></a></p>";
               
        }

      }

    if (
    $done <> "yes") { print "<p><b>Error:</b> Your image as not been uploaded becuase it is not a recognised image file. Please try again.</p>"; }
    }
    }

    ?>
    I made that, feel free to edit it
    *STEALS AND CALLS OWN* Jokes

    Yeh try that, im about to see what its like
    I am Tawm.

  2. #12
    Join Date
    Nov 2006
    Location
    In habbo :)
    Posts
    1,027
    Tokens
    0

    Latest Awards:

    Default

    Tferg tell me if it works.

  3. #13
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    3,285
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Drompo View Post
    PHP Code:
     <?
    // Script Made By Ashley Cusack
    // CONFIG
    $serverpath "upload/";   // Path to where images should be upload the server.
    $urltoimages "http://youngfm.co.uk/uploader/upload";  // Web address to where the images are accessible from.
    $maxsize "500000";     // Example - 20000 is the same as 20kb
    $uniq uniqid("");
    // CONFIG END

    $mode $_GET['mode'];
    if (
    $mode == "") { $mode "form"; }

    if (
    $mode == "form") {
    echo 
    "<form enctype='multipart/form-data' method='post' action='?mode=upload'>\n";
    echo 
    "Upload file: <input type='file' name='file'>\n";
    echo 
    "<br><input type='submit' name='Submit' value='Upload'>\n";
    echo 
    "<br>Maximum File Size: $maxsizeb Bytes";
    echo 
    "<br>$file";
    }

    if (
    $mode == "upload") {
    $file $_FILES['file']['name'];
    $name time() . substr($file, -4);
     
    // If you add your own file types don't forget to add an uppercase version.
     
    $allowedfiles[] = "gif";
     
    $allowedfiles[] = "jpg";
     
    $allowedfiles[] = "jpeg";
     
    $allowedfiles[] = "jfef";
     
    $allowedfiles[] = "jpe";
     
    $allowedfiles[] = "png";
     
    $allowedfiles[] = "GIF";
     
    $allowedfiles[] = "JPG";
     
    $allowedfiles[] = "JPEG";
     
    $allowedfiles[] = "JFEF";
     
    $allowedfiles[] = "JPE";
     
    $allowedfiles[] = "PNG";
     
    $allowedfiles[] = "PDF";
     
    $allowedfiles[] = "pdf";
     
    $allowedfiles[] = "PSD";
     
    $allowedfiles[] = "psd";
     
    $allowedfiles[] = "bmp";
     
    $allowedfiles[] = "BMP";
     
    $allowedfiles[] = "tif";
     
    $allowedfiles[] = "tiff";
     
    $allowedfiles[] = "TIF";
     
    $allowedfiles[] = "TIFF";
     
    $allowedfiles[] = "dib";
     
    $allowedfiles[] = "DIB";


     if(
    $_FILES['file']['size'] > $maxsize)
     {
      print 
    "File size is too big - please reduce file size and try again.";
      }
      else {
      
    $path "$serverpath/" $name;
      foreach(
    $allowedfiles as $allowedfile) {
     
      if (
    $done <> "yes") {
      if (
    file_exists($path)) {
       echo 
    "A file with this name already exists - please rename the file and reupload.";
       exit;
      }
      }
     
      if (
    substr($file, -3) == $allowedfile) {
        
    move_uploaded_file($_FILES['file']['tmp_name'], "$path");
        
    $done "yes";
        echo 
    "<p>Your image has been successfully uploaded to our server and can be accessed using the URL provided below.</p>";
        echo 
    "<p><img src='$urltoimages/$name' border='0'>"
        echo 
    "<p>Direct Link: <input name='direct' type='text' size='75' value='$urltoimages/$name'></a></p>";
               
        }

      }

    if (
    $done <> "yes") { print "<p><b>Error:</b> Your image as not been uploaded becuase it is not a recognised image file. Please try again.</p>"; }
    }
    }

    ?>
    I made that, feel free to edit it
    That's a pretty nice little script. Do you mind if I edit it to add some more advanced features?



    i used to be NintendoNews. visit my blog or add me on twitter.
    need help with vista? i am a microsoft certified technology specialist in configuring windows vista and connected home integrator.. pm me for help!


    "I am the way, the truth, and the life. No one comes to the Father except through me"
    John 14:6 (NIV)


  4. #14
    Join Date
    Nov 2006
    Location
    In habbo :)
    Posts
    1,027
    Tokens
    0

    Latest Awards:

    Default

    I made that, feel free to edit it - Lol

  5. #15
    Join Date
    Mar 2007
    Posts
    23
    Tokens
    0

    Default

    London check pm's

    Jaymai, Benji , Posh FTW!

  6. #16
    Join Date
    Jul 2006
    Location
    Athens
    Posts
    842
    Tokens
    0

    Default

    Feel free to edit it.

    Just posted a tutorial for this.


  7. #17
    Join Date
    Mar 2007
    Posts
    31
    Tokens
    0

    Default

    Works 100&#37; I want to make one like Uploadz.co.uk lol ?
    I am Tawm.

  8. #18
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    3,285
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by TFerg006 View Post
    Works 100% I want to make one like Uploadz.co.uk lol ?
    You'll need lots of bandwidth (and quite a lot of space) then :




    i used to be NintendoNews. visit my blog or add me on twitter.
    need help with vista? i am a microsoft certified technology specialist in configuring windows vista and connected home integrator.. pm me for help!


    "I am the way, the truth, and the life. No one comes to the Father except through me"
    John 14:6 (NIV)


Page 2 of 2 FirstFirst 12

Posting Permissions

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