Now supports CurlFile class for newer versions of php