I am trying to use cURL in a plugin but it doesn't seem to work. code: PHP: $plugin = $args; $sender->sendMessage($args); set_time_limit(0); $url = "https://pmpm-hittmana.c9users.io/plugins/download/$plugin.zip"; $sender->sendMessage($url); //This is the file where we save the information $fp = fopen ("$plugin.zip", 'w+'); $sender->sendMessage(dirname("../$plugin.zip")); //Here is the file we are downloading, replace spaces with %20 $ch = curl_init(str_replace(" ","%20",$url)); curl_setopt($ch, CURLOPT_TIMEOUT, 120); curl_setopt($ch, CURLOPT_FILE, $fp); // get curl response curl_exec($ch); curl_close($ch); fclose($fp); $args is ArmorSpawn and I have confirmed that I can download it both on a browser and if I run the above code modified for native php. The problem is that it does not write anything to the file that is created. The file is there but it is 0 bytes. Why does my cURL request not work?