ID: 11228 Comment by: Indian-American62 at hotmail dot com Reported By: kluit at home dot nl Status: Closed Bug Type: *Directory/Filesystem functions Operating System: linux PHP Version: 4.0.4pl1 New Comment:
<a href=http://www.geocities.com/ylesreuhcs6322/>American Indian</a> Previous Comments: ------------------------------------------------------------------------ [2001-05-31 23:21:45] [EMAIL PROTECTED] I now added the 'from' directive example into php.ini-dist file which is distributed with the php sources. --Jani ------------------------------------------------------------------------ [2001-05-31 23:21:07] [EMAIL PROTECTED] You have to use urlencode() on the password: <?php $passwd=urlencode("[EMAIL PROTECTED]"); $fp=fopen("ftp://anonymous:".$passwd."@ftp.funet.fi/pub/README", "r"); echo fread($fp, 100); fclose($fp); ?> OR you can use the undocumented 'from' directive in php.ini to set your default anonymous ftp/http server password: from="[EMAIL PROTECTED]" --Jani ------------------------------------------------------------------------ [2001-05-31 19:22:13] kluit at home dot nl Using the fopen() command as fopen (ftp://url/file) logs on as user anonymous, but the password send in not a complete e-mail adres. My remote server declined acces. An fopen(ftp://anonymous:[EMAIL PROTECTED]@server/file, r) does not work, resulting in a bad file description error. I found my ISP server letting itself trick with john!doe.com and fopen(anonymous:[EMAIL PROTECTED]/file, r) is being correct interpreted by php. Maybe it's an idea to include a full e-mail adres in anonymous access or to change the @ separater to something else? gr. robin ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=11228&edit=1
