-
FAQ
- Forum Search
- Community
- Online Manual
- Support Helpers of the Month
- Function Database
ftp_connection::passive
Description
Attempts to establish a passive connection to the FTP server.
Syntax
bool ftp_connection::passive ()
Return value
Expected type: Boolean
Description: True if successful, false otherwise
Notes
- See http://www.slacksite.com/other/ftp.html for a detailed explanation on passive mode.
- Example: $package_ftp->passive();
- Checks to make sure a connection has actually been made first.
- Sends the PASV command to the server and waits 5 seconds for a response.
- Checks for a 227 (Entering passive mode) response code
- Sets a 'bad_response' error if the response code isn't 227 or the IP/Port info isn't valid
- Returns false if there's no connection or the response wasn't valid
- Parses IP/port info and puts it in "pasv" array for later use
- Returns true if successful
Advertisement:- Help | Terms and Rules | Go Up ▲
- Copyright © 2022 Simple Machines. All Rights Reserved.
- Page created in 0.015 seconds with 13 queries.
- Forum Search