from: http://www.ietf.org/rfc/rfc1635.txt
"What is Anonymous FTP?
"...
"Traditionally, this special anonymous user account accepts any string as a password, although it is common to use either the password "guest" or one's electronic mail (e-mail) address. Some archive sites now explicitly ask for the user's e-mail address and will not allow login with the "guest" password. Providing an e-mail address is a courtesy that allows archive site operators to get some idea of who is using their services. "
So your code would be:
<?php
ftp_login('ftp.example.com', 'anonymous', 'user@example.com');
?>
If a blank password works, you might have a default password set in your php.ini