+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 21
Web Development Thread, Upload to ftp server via form in Coding and Web Development; i gave been given the task of creating a website for someone. The asked for someway to upload a file ...
  1. #1
    darbyshire's Avatar
    Join Date
    Nov 2007
    Location
    Wigan
    Posts
    75
    Thank Post
    14
    Thanked 2 Times in 2 Posts
    Rep Power
    14

    Upload to ftp server via form

    i gave been given the task of creating a website for someone.

    The asked for someway to upload a file on the website.

    Is there any way to do this and also show uploaded files on the page?

    Thanks
    Peter

  2. #2

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,855
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    181
    If you've got script permissions, probably something like ...:::: PHP File Manager

  3. #3
    darbyshire's Avatar
    Join Date
    Nov 2007
    Location
    Wigan
    Posts
    75
    Thank Post
    14
    Thanked 2 Times in 2 Posts
    Rep Power
    14
    i was looking at something simple like a browse box and a submit button.

    and a list of files/folder for them to browse.

    Thanks
    Peter

  4. #4

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,855
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    181
    You'll probably have to write your own, I don't know of anything that specific off the shelf.

  5. #5
    mossj's Avatar
    Join Date
    Dec 2008
    Location
    Leicester
    Posts
    1,466
    Thank Post
    157
    Thanked 189 Times in 174 Posts
    Rep Power
    51
    Quote Originally Posted by darbyshire View Post
    i was looking at something simple like a browse box and a submit button.

    and a list of files/folder for them to browse.

    Thanks
    Peter
    take a look at W3Schools Online Web Tutorials in the php section, in particular (from the first paragraph) this article http://www.w3schools.com/php/php_file_upload.asp

  6. #6
    darbyshire's Avatar
    Join Date
    Nov 2007
    Location
    Wigan
    Posts
    75
    Thank Post
    14
    Thanked 2 Times in 2 Posts
    Rep Power
    14
    tried the post by mossj

    did everything it asked and getting

    "No such file or directory in E:\domains\k\kingsbridgecluster.co.uk\user\htdocs\ upload_file.php on line 25"

    anyone know?

    Thanks
    Peter

  7. #7
    dwhyte85's Avatar
    Join Date
    Mar 2009
    Location
    Berkshire
    Posts
    1,199
    Thank Post
    149
    Thanked 143 Times in 129 Posts
    Rep Power
    75
    If you want to go the FTP route:

    PHP: ftp_connect - Manual

    FTP_CONNECT()

    &

    FTP_PUT()

    PHP Code:
    <?php
    $file 
    'somefile.txt';
    $remote_file 'readme.txt';

    // set up basic connection
    $conn_id ftp_connect($ftp_server);

    // login with username and password
    $login_result ftp_login($conn_id$ftp_user_name$ftp_user_pass);

    // upload a file
    if (ftp_put($conn_id$remote_file$fileFTP_ASCII)) {
     echo 
    "successfully uploaded $file\n";
    } else {
     echo 
    "There was a problem while uploading $file\n";
    }

    // close the connection
    ftp_close($conn_id);
    ?>
    Put your form within here and do it this way (if it has to be FTP).

  8. Thanks to dwhyte85 from:

    darbyshire (19th May 2009)

  9. #8

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    8,941
    Thank Post
    232
    Thanked 1,510 Times in 1,206 Posts
    Rep Power
    328
    If you want a very basic FTP application, explorer has a built in FTP client. You could create a shortcut and it would literally be "drag and drop" into the folder.

  10. Thanks to Michael from:

    darbyshire (19th May 2009)

  11. #9
    mossj's Avatar
    Join Date
    Dec 2008
    Location
    Leicester
    Posts
    1,466
    Thank Post
    157
    Thanked 189 Times in 174 Posts
    Rep Power
    51
    or you could use WebDav which would work in a simular way to ftp folders

  12. Thanks to mossj from:

    darbyshire (19th May 2009)

  13. #10
    darbyshire's Avatar
    Join Date
    Nov 2007
    Location
    Wigan
    Posts
    75
    Thank Post
    14
    Thanked 2 Times in 2 Posts
    Rep Power
    14
    thanks guys i will have a look at these now.

    Peter

  14. #11
    darbyshire's Avatar
    Join Date
    Nov 2007
    Location
    Wigan
    Posts
    75
    Thank Post
    14
    Thanked 2 Times in 2 Posts
    Rep Power
    14
    Quote Originally Posted by Michael View Post
    If you want a very basic FTP application, explorer has a built in FTP client. You could create a shortcut and it would literally be "drag and drop" into the folder.
    I have got a link to the ftp server which is hosted by an external company. when i click the link it comes up with the username and password. i only have one to access it. Would there by anyway of making a new username and password for the users (prob only need one) or will i have to ring the company?

    Thanks
    Peter

  15. #12

    rush_tech's Avatar
    Join Date
    Jul 2006
    Location
    Nottingham
    Posts
    1,386
    Thank Post
    109
    Thanked 261 Times in 197 Posts
    Rep Power
    192
    Quote Originally Posted by darbyshire View Post
    I have got a link to the ftp server which is hosted by an external company. when i click the link it comes up with the username and password. i only have one to access it. Would there by anyway of making a new username and password for the users (prob only need one) or will i have to ring the company?

    Thanks
    Peter
    Yes, just ask you host to reset your password.

  16. #13
    apoth0r's Avatar
    Join Date
    Apr 2007
    Location
    Northants
    Posts
    1,221
    Thank Post
    151
    Thanked 180 Times in 132 Posts
    Rep Power
    51
    or if your host has a cpanel, create yourself a new FTP account with access to what needs accessing. Saves on "accidents" later

    ( myurl .com/cpanel)

  17. #14
    darbyshire's Avatar
    Join Date
    Nov 2007
    Location
    Wigan
    Posts
    75
    Thank Post
    14
    Thanked 2 Times in 2 Posts
    Rep Power
    14
    nah doesnt have a cpanel.
    I was just given this to carry on with.

    All i need is a folder /ftp server/uploads to be able to have access by people so they can put documents on, view them but not delete. But when i come to change permission it is saying i dont have permission to do so. -_-!

    Peter

  18. #15

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,144
    Thank Post
    113
    Thanked 518 Times in 447 Posts
    Blog Entries
    2
    Rep Power
    121
    The other thing you need to be really careful with is checking who can get to this page to upload - if it's open to the world then the world will use it. In no time at all, you'll find your ftp space full of "warez" or just a denial of service attack mounted against you!

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. FTP automated file upload
    By googlemad in forum Windows
    Replies: 4
    Last Post: 8th April 2009, 11:22 AM
  2. [Ubuntu] Upload files to my Ubuntu Web Server
    By FN-GM in forum *nix
    Replies: 13
    Last Post: 17th February 2009, 06:04 PM
  3. FTP Server
    By DSapseid in forum Windows
    Replies: 3
    Last Post: 11th February 2009, 11:20 AM
  4. FTP for administration server
    By apoth0r in forum How do you do....it?
    Replies: 5
    Last Post: 19th July 2007, 02:22 PM
  5. Replies: 18
    Last Post: 8th July 2006, 12:13 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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