SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot 2ndmouse's Avatar
    Join Date
    Jan 2007
    Location
    West London
    Posts
    196
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help needed with PHP FTP function

    I'm trying to determine what the following code returns when the server is a true windows/iis server.

    The response from a linux server is:

    Array
    (
    [0] => 215 UNIX Type: L8
    )
    The response from my 'supposed' windows server is:

    Array
    (
    [0] => 215 UNIX emulated by FileZilla
    )
    Presumably, this isn't a true windows server.

    Here's the code:

    PHP Code:
    // make FTP connection
        
    $conn_id = @ftp_connect($ftp_server) OR die("Unable to establish an FTP connection");
        
    ftp_login($conn_id$ftp_user$ftp_pw) OR die("ftp-login failed - User name or password not correct");
        
    ftp_pasv $conn_idtrue ) or die("Unable to set FTP passive mode."); //Use passive mode for client-side action

          
    echo '<pre>'
          
    print_rftp_raw($conn_id,'SYST'));
          echo 
    '</pre>';
          
    ftp_close($conn_id); 
    If anyone has FTP access to a windows/iis server, I would be most grateful to know what the response to my code is.
    Detect file changes remotely. SimpleSiteAudit is an early
    warning anti-hacker system which sends an alert on detection.

    PHP Find Orphan Files - Finds all the unreferenced files on your site.

  2. #2
    SitePoint Zealot 2ndmouse's Avatar
    Join Date
    Jan 2007
    Location
    West London
    Posts
    196
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To make my code a fraction easier to use, I've added the variable inits. There's only 3:

    PHP Code:
    $ftp_server 'ftp.domain.com';
    $ftp_user 'username';
    $ftp_pw 'password';

        
    // make FTP connection
        
    $conn_id = @ftp_connect($ftp_server) OR die("Unable to establish an FTP connection");
        @
    ftp_login($conn_id$ftp_user$ftp_pw) OR die("ftp-login failed - User name or password not correct");
        @
    ftp_pasv $conn_idtrue ) or die("Unable to set FTP passive mode."); //Use passive mode for client-side action
        
    echo '<pre>'
    print_rftp_raw($conn_id,'SYST'));
    echo 
    '</pre>';

        
    ftp_close($conn_id); 
    Detect file changes remotely. SimpleSiteAudit is an early
    warning anti-hacker system which sends an alert on detection.

    PHP Find Orphan Files - Finds all the unreferenced files on your site.

  3. #3
    SitePoint Evangelist
    Join Date
    May 2006
    Location
    Austin
    Posts
    401
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Looks like the server is running a filezilla FTP server instead of an IIS server. You would need to stop to the filezilla server and configure IIS for ftp if that's the route you want to go.
    Merchant Equipment Store - Merchant Services, POS, Equipment, and supplies.
    Merchant Account Blog | Ecommerce Blog

  4. #4
    SitePoint Zealot 2ndmouse's Avatar
    Join Date
    Jan 2007
    Location
    West London
    Posts
    196
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, but I don't have that kind of access to the server. I was hoping that someone would run my code on a windows/iis server and let me know what response they got. That's all.
    Detect file changes remotely. SimpleSiteAudit is an early
    warning anti-hacker system which sends an alert on detection.

    PHP Find Orphan Files - Finds all the unreferenced files on your site.


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
  •