How to download file via command line in php?
<p>I want to paste one script in all my client machine which call php file which is on my server.</p>

<p>Let say my server path is www.google.com/support/lokesh.php</p>

<p>So that I want to put one file to all my client machine at location where it call php file(for example if it call from /home/lalu/myscript.sh) then my php code will put one file(additional.sh) to /home/lalu/additional.sh</p>

<p>below is my code to download file</p>

<pre><code>header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename('google.com/support/lokesh.txt'));
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize('/home/lokesh/lalu.txt'));
readfile('/home/lokesh/lalu.txt');
    //for sending mail fif only one user is available   
exit;
</code></pre>

<p>I want to paste one file location at client machine from where it call server file.</p>