Using curl to upload a file attachment
Does anyone have the code to upload a file attachment by php.
Does anyone have the code to upload a file attachment by php. I keep getting "missing localfname" but cannot set it. Every example I can find, uses get_contents which doesn't work anymore.
Version (include the version you are using, if applicable):
Code Snippet (add any code snippets that support your topic, if applicable):
$curl = curl_init();
$url = 'http://www.adserversite.com/ads.php';
CURLOPT_URL => $url,
CURLOPT_HEADER => 0,
CURLOPT_HTTPHEADER => "test",
CURLOPT_FOLLOWLOCATION => 1,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_CONNECTTIMEOUT => 20,