You could install the 'expect' package on linux, which is a scripting engine allowing you to 'expect' input options from other programs - it basically lets you hook a program, match a string, then send the input to that program once it matches that string. You could then use PHP to store your password, hook the expect program, and pass your password to the scp program.
There may be an easier way to do it, but I don't know it. 😛 If you've got FTP servers installed on the second machine, you could possibly use PHP's built-in FTP functions to transfer the files over.
Edit: I just tested this and it seems to work fine. You'd need to basically make an expect script, then hook it with php.
!#/usr/bin/expect
spawn scp my_filename horizon@scriptsamurai.com/home/horizon/
expect "password:"
send "mypassword\r"
interact
I had to chmod +x it, of course, but then I could run ./test.exp and it copied it up just fine. I don't know what distribution you're running, but 'sudo apt-get install expect' worked fine for me. 🙂