If there's no interactive-ness going on, then why not just use FTP to grab the log?
Unless you're using PHP CLI, then this would be really hard, if not impossible. It has to be somewhat interactive to know when to put in the password.
Another option would be to create maybe a shell script to login and do this, then execute the shell script from PHP.