Can you post your code exactly? (I know this isn't it because you are missing a ')' at line 8) Also, post any errors that you are receiving. It may also help to turn on debuging to see if there is a network problem.
Ya beat me to it! That is the error. I took his snipet, added var info, made the correction and was able to ftp to a machine. So unless there is something else going on; code would be good here