You forget to call “curl_close($ch);” at the end ;-)