> Good day. > > I have some notes for chapter: http://www.php.net/manual/ru/features.remote-files.php > Next part of it: > ----- > To connect as a user other than 'anonymous', you need to specify the > username (and possibly password) within the URL, such as > 'ftp://user:[EMAIL PROTECTED]/path/to/file'. (You can use the > same sort of syntax to access files via HTTP when they require Basic authentication.) > ----- > Need new note, because Microsoft in latest patch-s disable this > feature (passing Basic authentication). > Not true.
MS disabled this feature within Internet Explorer. This change bears no effect on the ability of webservers (including IIS) to deal with authorization sent from PHP or any other client which still supports this syntax. Internally, what happens is that PHP takes apart the URL looking for username/password combinations and sends them in a separate format (not in the actual URL). For HTTP (expressed as PHP equivalent syntax): fwrite($socket, 'Authorization: basic ' . base64_encode($user . ':' . $pass) . "\r\n"); For FTP: fwrite($socket, "USER $user\r\n"); fwrite($socket, "PASS $pass\r\n"); -Sara
