I am trying send a curl request to a URL which requires HTTP_ORIGIN to be set, I have this so far...
$headers = array(
'Origin: www.myorigin.com',
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_HEADER, true,
CURLOPT_HTTPHEADER, $headers,
CURLOPT_URL => 'http://www.example.com',
CURLOPT_USERAGENT => 'Sample Request'
));
$resp = curl_exec($curl);
curl_close($curl);
This is giving me an error on the server side of Undefined index: HTTP_ORIGIN so it doesn't look like it is passing the origin through.
Have I set this up correctly?