You cannot download PHP codes. they are in server. Your teacher must be the worst one in the world. he never mentioned client-server architecture?
Server Side - PHP/ASP/MYSQL/SERVLET
FTP clients like Filezilla can download files from server. But you need a FTP account first. I don't think your friend is stupid enough to give you a FTP account lol