envexlabs Posted December 18, 2008 Share Posted December 18, 2008 Hey, Is it possible to upload a file from one server to another via php that doesn't require ftp? Thanks, envex Link to comment https://forums.phpfreaks.com/topic/137576-cross-domain-uploads/ Share on other sites More sharing options...
Maq Posted December 18, 2008 Share Posted December 18, 2008 Not sure... Did some research and found this piece of code from LinuxQuestions. $ch = curl_init("http://www.example.com/"); $fp = fopen("example_homepage.txt", "w"); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); fclose($fp); ?> Link to comment https://forums.phpfreaks.com/topic/137576-cross-domain-uploads/#findComment-719077 Share on other sites More sharing options...
rhodesa Posted December 18, 2008 Share Posted December 18, 2008 http://us3.php.net/manual/en/function.curl-setopt.php Example #2 Link to comment https://forums.phpfreaks.com/topic/137576-cross-domain-uploads/#findComment-719078 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.