Im trying to send data with CURL to an address like this.
$ch = curl_init("url address im sending data to.");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_HTTPHEADER, array('"Content-type: text/plain; charset=UTF-8"'));
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_object);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($curl, CURLOPT_POSTREDIR, 3);
curl_exec($ch);
However, my curl_errno($ch) returns 6 which is a "Couldn't resolve host." error.
Any idea why I'm getting this error and a solution to fix?
Thanks in advance!