I'm trying to POST data to an external URL using Curl, and am getting the error
Parse error: syntax error, unexpected T_STRING, expecting ')' in send.php on line 8
This is what send.php looks like:
<?php
// Initialize curl
$curl = curl_init();
// Configure curl options
$opts = array(
CURLOPT_URL => 'https://zapier.com/hooks/catch/n/abcd/'
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => 'guid='+ echo $_POST["guid"]; + '&video_title=' + echo $_POST["video_title"]; + '&email=' + echo $_POST["email"];
);
// Set curl options
curl_setopt_array($curl, $opts);
// Get the results
$result = curl_exec($curl);
// Close resource
curl_close($curl);
echo $result;
?>
I'm still a noob in php, so any help much appreciated :)