I have the following options that I am trying to set for my cURL object:
$options = array(
CURLOPT_URL => $targetUrl,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => array(
'Content-Type: ' . $_SERVER['CONTENT_TYPE'],
'Referer: ' . $_SERVER['HTTP_REFERER']
),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTPAUTH => CURLAUTH_ANY,
CURLOPT_USERPWD => "$username:$password"
);
And I get the following errors:
Notice: Undefined index: CONTENT_TYPE
Notice: Undefined index: HTTP_REFERER
Am I specifying the wrong name for those options, or are they just not being provided in the header?