This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
daniel11537
I am sending data to an API called push over, the request goes through and was working until I updated OctoberCMS to the lastest verison. I now get a javascript alert with the response from the curl request. Any Ideas? below is the code that is executed:
<form id="contact" data-request="onSend" data-request-success="processForm()">
function onSend() {
// Collect input
$name = post('cname');
$email = post('cemail');
$phone = post('cphone');
$message = post('cmessage');
// Submit form
curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => "https://api.pushover.net/1/messages.json",
CURLOPT_POSTFIELDS => array(
"token" => "removed",
"user" => "removed",
"device" => "iphone",
"title" => "title",
"sound" => "cosmic",
"message" => "Name: ".$name." Email:".$email." Phone:".$phone." Message:".$message,
)));
curl_exec($ch);
curl_close($ch);
return [
'message' => 'sent'
];
}
Last updated
jamiegrand
this could be why..
https://octobercms.com/forum/post/curl-setopt-curlopt-followlocation-error
1-2 of 2