I want to download content of a URL and then post it via cURL. I can know I can do something like this
$urlToDownload = "http://www.example.com/image.png";
copy($urlToDownload, $tmp);
$data = array(
'file' => '@' . $tmp . ';filename=' . $name
);
...
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
Is there anyway that I can directly post data of URL without create temporary file?