I have an question on which is faster, ftp_connect or building the ftp url ftp://username:password@server and using curl or file_get_contents to retrieve the the directory
I have an question on which is faster, ftp_connect or building the ftp url
Share
FTP sends credentials using the
USERandPASScommands, so the URL you provide is just a convenience method to pass everything to the client API packed in a single argument (then the library will split the URL and extract the parameter it needs to do the raw socket conversation)The same applies for other URLs which also accept user and password (like DB connection strings)