Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 49

Thread: FTP video upload from form

  1. #21
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I have no idea. You pick where you want it to go...
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  2. #22
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    Quote Originally Posted by djr33 View Post
    I have no idea. You pick where you want it to go...
    Not exactly. . . Every thing I have tried doesn't work. Maybe you can give it a shot and see if you can find the magic path?
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  3. #23
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    "define this as per local system"

    Looks like you'll need to figure out where your host puts the temporary uploaded files.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #24
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    Not to sound rude, but good grief man! I am the host (said it a few times on this thread) Hence why I can't contact the host to find out where to put it (that would be an awkward conversation. . . lots of silence and some mumbling, likely). Again, I don't want to sound rude -- your the only one stickin' with this thread . I will be setting up my computer as the server. Do I need to configure something, or look. . . somewhere in particular?
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  5. #25
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Regardless of who owns the server, you need to find out where your host [ie the hosting setup/system/configuration] actually places the data that is uploaded.
    I don't know very much about server configurations, so not sure what I can suggest.

    You could try to find where an uploaded file goes, just by looking for a new file when someone uploads it.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #26
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    OIC. Sorry.

    Is there anyone on DD that can build the script? I like to build all of my stuff myself, but I have been searching for months and haven't found a darn thing.

    I found this to, if it helps anyone-- but I couldn't get it to work.
    Last edited by Jas; 10-14-2007 at 03:03 AM.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  7. #27
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Quote Originally Posted by Jas View Post
    What I am really looking for is someone to correct the script at the beginning of this thread. . . It is somewhat functional, but it doesn't insert the data from the uploaded to the stored file.

    EDIT: I found this script:

    Code:
    <?php
    // get FTP access parameters
    $host = $_POST['host'];
    $user = $_POST['user'];
    $pass = $_POST['pass'];
    $destDir = $_POST['dir'];
    $workDir = "/usr/local/temp"; // define this as per local system
    
    // get temporary file name for the uploaded file
    $tmpName = basename($_FILES['file']['tmp_name']);
    
    // copy uploaded file into current directory
    move_uploaded_file($_FILES['file']['tmp_name'], $workDir."/".$tmpName)
     or die("Cannot move uploaded file to working directory");
    
    // open connection
    $conn = ftp_connect($host) or die ("Cannot initiate connection to
     host");
    
    // send access parameters
    ftp_login($conn, $user, $pass) or die("Cannot login");
    
    // perform file upload
    $upload = ftp_put($conn, $destDir."/".$_FILES['file']['name'], 
     $workDir."/".$tmpName, FTP_BINARY);
    
    // check upload status
    // display message
    if (!$upload) {
      echo "Cannot upload";
    } else {
      echo "Upload complete";
    }
    
    // close the FTP stream
    ftp_close($conn);
    
    // delete local copy of uploaded file
    unlink($workDir."/".$tmpName) or die("Cannot delete uploaded
     file from working directory -- manual deletion recommended");
    ?>
    But what is this:
    $workDir = "/usr/local/temp"; // define this as per local system
    I can't figure out what it should be.
    Can anyone help here?
    Try %temp%

    (Only works on Windows)
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  8. #28
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    Thanks for the suggestion, but it didn't work.

    Cannot move uploaded file to working directory
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  9. #29
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Then try the root of your web folder, or don't enter anything at all.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  10. #30
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    Tried that already. Same things (even with full path or full url). I am REALLY thinking that I am missing something fundemental here. . . But I have no idea what. Can someone perhaps try to make it work, and then let me know what happened?
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

Bookmarks

Posting Permissions

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