Hello

I have 2 servers
server 1 at (fake IP) 1.2.3.4
server 2 (server I am locally running on)
I have a file called test.zip in server 1. The file is located at the server's htdocs folder
for example: http://1.2.3.4/test.zip

I am now in server 2 and I want to "pull" (copy) that file from server 1

I created a php file called copy.php in server2 and tried the following:
Code:
ini_set('max_execution_time', 1800);
set_time_limit(0);

$source = "http://1.2.3.4/test.zip";
$target = "/usr/local/apache/htdocs/test.zip";

if (!copy($source, $target)) {
	print "Failed to copy";
}
else {
	print "Success";
}
When I run this simple script, I get the following error:
Code:
Warning: copy('/usr/local/apache/htdocs/test.zip') [function.copy]: failed to open stream: Permission denied in /usr/local/apache/htdocs/copy.php on line 9
Failed to copy
what could be causing this?
maybe I can use curl_exec to get the file instead of using copy
Note, that the file is very large 70MB. could this be a problem for copy? or even for the script which might time out?

regards