Re: Basic-autorization

From: Date: Thu, 08 Apr 2004 15:32:47 +0000
Subject: Re: Basic-autorization
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969359987@lists.php.net to get a copy of this message
> 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:password@ftp.example.com/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

« previous php.doc (#969359987) next »