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 14
  1. #1
    Join Date
    Oct 2005
    Location
    Spain, Valencia
    Posts
    20,492
    Tokens
    3,575
    Habbo
    GoldenMerc

    Latest Awards:

    Default How would i make it upload to another sever

    Well say i had the upload page on sever 1, but i want the images to go to sever 2, how would i go about doing this?
    +rep 5 times kk

  2. #2
    Join Date
    Dec 2007
    Location
    Manchester
    Posts
    2,236
    Tokens
    118
    Habbo
    hamheyelliot

    Latest Awards:

    Default

    Usually I suppose you would have to point the upload form to the PHP File on the other server, ensuring the folder you want the files to go into have the correct permissions.

  3. #3
    Join Date
    Oct 2005
    Location
    Spain, Valencia
    Posts
    20,492
    Tokens
    3,575
    Habbo
    GoldenMerc

    Latest Awards:

    Default

    the upload form has to be on sever 1.

  4. #4
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    Why don't you have the upload on server 1 upload images to a folder on server 1. Then on server 2 use file_get_contents() to grab the images or files from that particular folder?
    Back for a while.

  5. #5
    Join Date
    Oct 2005
    Location
    Spain, Valencia
    Posts
    20,492
    Tokens
    3,575
    Habbo
    GoldenMerc

    Latest Awards:

    Default

    Thats a fairly gooooood idea actually, Would it be easy to code dya think?
    Ross

  6. #6
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by HHGS.Net View Post
    Thats a fairly gooooood idea actually, Would it be easy to code dya think?
    Ross
    Shouldn't be too hard. Or of course you can just have something like this:

    Server 1:
    HTML Code:
    <form method="post" action="www.server2.com/upload.php"  enctype="multipart/form-data" />
    <input type="file" name="file" />
    <input type="submit" name="submit" value="Upload" />
    </form>
    Server 2:
    PHP Code:
    <?php
    // handles all data from server 1 and uploads it to server 2
    ?>
    Back for a while.

  7. #7
    Join Date
    Oct 2005
    Location
    Spain, Valencia
    Posts
    20,492
    Tokens
    3,575
    Habbo
    GoldenMerc

    Latest Awards:

    Default

    hmm, nah i think your first idea was fairly decent...

  8. #8
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by HHGS.Net View Post
    hmm, nah i think your first idea was fairly decent...
    Sounds good.

    Just use file_get_contents() to read the folder.
    Back for a while.

  9. #9
    Join Date
    Oct 2005
    Location
    Spain, Valencia
    Posts
    20,492
    Tokens
    3,575
    Habbo
    GoldenMerc

    Latest Awards:

    Default

    Right now im confused, would file_get_contents() go in the folder where i want the images to go in? what would i name that file too n the coding in that file?
    Ross

  10. #10
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    Basically you'd do something like this. Somebody correct me if I am wrong.

    PHP Code:
    <?php

    $file 
    "index.php";

    $files file_get_contents('url');

    file_put_contents($file$files);

    ?>
    Now I'm not sure if that works but yeah, try.
    Back for a while.

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
  •