can someone help me how to transfer files from one server to another server using curl?? please help me, i really need your help

Please show some code you work around.

You can use the code below, just change the $save_path and the $url values to fit your need.

<?php
			$save_path = 'path_to_save';
			$url = "http://domain.com/file_path/filename.extension;
			
			$fp = fopen($save_path.basename($url), 'w');				
			$ch = curl_init($url);		
			curl_setopt($ch, CURLOPT_FILE, $fp);			 
			$data = curl_exec($ch);			 
			curl_close($ch);
			fclose($fp);		
		?>

thanks.

Does the code above solve your problem? Please make this post solved, thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.