Forum Moderators: coopster
If console is available then you can use simple ftp or more secure scp. You can even use wget if the file is in a www location.
I transfer around 1Gb of various file types a day between two servers. The data is tar zipped and scp'd automatically via a cron job.
but if that script helps him that it would be great,for him.... :)
in the file downloader.php :
/* Send The Request */
fwrite($sockethandle, $request);
$result = "";
$maxsize=1048576*5; < < < this!
status("Waiting for reply");
while (!feof($sockethandle))
but changing the values here doesnt make any difference,according to him..
it stops after 5mb and file isnt uploaded..
Any way to make this work?
[edited by: coopster at 9:34 pm (utc) on Sep. 20, 2006]
[edit reason] no urls please TOS [webmasterworld.com] [/edit]
In other words, just make an HTTP request to one PHP with the other.
The PHP on the server with the files you want can be very simple especially if you know what you're getting:
//fileserver.php
...
$filetoget=$_REQUEST[file]; // a full absolute path to the file.
header("application/octet-stream") //you may need this ...
$handle=fopen($filetoget);
while ($handle) echo fread($handle);
...
On the recieving end, just create a PHP to GET and recieve the file. Call it like -- script.php?get=<filename> -- a browser can also request the file -- the application/octet-stream content-type is usually saved by browsers.
$getfile=$_REQUEST[get];
$handle=fopen("http.../fileserver.php?file=".$getfile);
$filedata="";
while ($handle) $filedata =. fread($handle);
// now you have the file -- you may want to name and save the file which now exists in $filedata.