Results 1 to 12 of 12

Thread: upload

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Sep:2007
    Location: Bulgaria
    Posts: 74

    upload

    !
    , ftp LINUX !
    Windows, LINUX Slackware! proftp ! ftp , ftp://172.16.2.1!
    LINUX , dhcp , PPPoE !
    command promp- Windows-a, , anonymous
    , !
    :
    Code:
    $ftp_server = "ftp.172.16.2.1";
    $ftp_user_name = "anonymous";
    $ftp_user_pass = "anonymous";
    , , ftp ! :? :? :?
    Code:
    $conn_id = @ftp_connect($ftp_server); //    -
            $login_result = @ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); //  
            if ((!$conn_id) || (!$login_result)) { //           
                echo "FTP connection has failed!<br/>";
                echo "Attempted to connect to ".$ftp_server." for user ".$ftp_user_name."<br/>";
                die(0); //   
    !
    !!!!

  2. #2
    Registered User iMarh's Avatar
    Join Date: May:2002
    Location:
    Posts: 373
    $ftp_server = "ftp.172.16.2.1"; ?!?!?!

  3. #3
    Dark tranquillity
    Join Date: Aug:2006
    Location: Sofia
    Posts: 796
    Quote Originally Posted by iMarh View Post
    $ftp_server = "ftp.172.16.2.1"; ?!?!?!
    ,
    Core 2 Duo E6600 @ 3.15GHz + Zalman 9500| Gigabyte 965P DS-4 | Asus EAX1950Pro + Samsung 226BW | 4 x 1GB DDR-2 800 A-Data | CM Elite 330 + Fortron BS 500W | X-Fi Fatal1ty Pro | Samsung HD400LJ 400GB | NEC AD-7170A | MS Natural KB + A4 X7 G100 Game pad | Mouse A4 X750 BF

  4. #4
    Registered User iMarh's Avatar
    Join Date: May:2002
    Location:
    Posts: 373
    Quote Originally Posted by metalhead117 View Post
    ,
    ?

  5. #5
    Dark tranquillity
    Join Date: Aug:2006
    Location: Sofia
    Posts: 796
    Quote Originally Posted by iMarh View Post
    ?
    Core 2 Duo E6600 @ 3.15GHz + Zalman 9500| Gigabyte 965P DS-4 | Asus EAX1950Pro + Samsung 226BW | 4 x 1GB DDR-2 800 A-Data | CM Elite 330 + Fortron BS 500W | X-Fi Fatal1ty Pro | Samsung HD400LJ 400GB | NEC AD-7170A | MS Natural KB + A4 X7 G100 Game pad | Mouse A4 X750 BF

  6. #6
    Registered User leechaa's Avatar
    Join Date: Aug:2007
    Location:
    Posts: 27

    Arrow

    Quote Originally Posted by metalhead117 View Post
    pwizard
    , .

  7. #7
    Registered User
    Join Date: Sep:2007
    Location: Bulgaria
    Posts: 74
    !!!

  8. #8
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    "ftp.172.16.2.1" e . "172.16.2.1".
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  9. #9
    Registered User
    Join Date: Sep:2007
    Location: Bulgaria
    Posts: 74
    Quote Originally Posted by Bombera View Post
    "ftp.172.16.2.1" e . "172.16.2.1".
    !
    Connect- ! upload-a
    Code:
      $ftp_server = "172.16.2.1";
      $conn_id = ftp_connect($ftp_server);
      $destdir = "/home/ftp/upload";
      $destination_file=$destdir.$HTTP_POST_FILES['userfile']['name'];
      $source_file=$HTTP_POST_FILES['userfile']['tmp_name'];
      $upload = @ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
    :
    Code:
    <table align="center">
    <form enctype="multipart/form-data" action="?op=upload" method="post">
        <tr>
            <td align="right">Upload file: </td>
            <td><input name="userfile" type="file" /></td>
        </tr>
        <tr>
    <tr>
            <td align="right"> </td>
            <td><input type="submit" value="Send file"/></td>
        </tr>
    </form>
    </table>
    </pre>
    , !!!
    Last edited by pwizard; 1st October 2007 at 17:42.

  10. #10
    Registered User
    Join Date: Sep:2007
    Location: Bulgaria
    Posts: 74
    ftp , $destdir="/uploads/"
    , :
    Code:
    $upload = @ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);

    Code:
    $destination_file=$destdir.$HTTP_POST_FILES['userfile']['name'];
     $source_file=$HTTP_POST_FILES['userfile']['tmp_name'];
    $destdir = "/upload/";
    , , !!!!

  11. #11
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    $destdir.
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  12. #12
    Registered User
    Join Date: Sep:2007
    Location: Bulgaria
    Posts: 74
    ???
    :
    Code:
    Connected to 172.16.2.1, for user anonymous
    
    Warning: ftp_put() [function.ftp-put]: Radio Fresh.m3u: Permission denied in /var/www/htdocs/upload.php on line 41
    FTP upload has failed!
    upload 777!( )

Posting Permissions

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

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |