curl - post request send file from link

kozak

New Member
Is it possible to send a link of file instead of content in curl post request ?\[code\]$file_to_upload = array('file_contents'=>'@'.$file_name_with_full_path);$ch = curl_init();curl_setopt($ch, CURLOPT_URL,$target_url);curl_setopt($ch, CURLOPT_POST,1);curl_setopt($ch, CURLOPT_POSTFIELDS, $file_to_upload);$result=curl_exec ($ch);curl_close ($ch);echo $result; \[/code\]can I put a link instead of $file_name_with_full_path ?
 
Top