<p>I want to setup a CRON that runs a PHP script that in turn moves XML file (holding non-sensitive information) from one server to another. </p>

<p>I have been given the proper username/password, and want to use SFTP protocol. The jobs will run daily. There is the potential that one server is Linux and the other is Windows.  Both are on different networks.  </p>

<p>What is the best way to move that file?</p>

Why not use
shell_exec
and
scp
?
```
```
<?php
    $output = shell_exec('scp file1.txt dvader@deathstar.com:somedir');
    echo "<pre>$output</pre>";
?>
```
```