Answer the question
In order to leave comments, you need to log in
How to remove data resending to Bitrix24 in a PHP script?
Good afternoon experts! )
I continue to set up receiving leads from application forms, directly in Bitrix24.
The script is already working and sending data from a simple HTML site via PHP to Bitrix, but there was a problem that two leads come from one form filling - one as it should be with the data as configured in the script, and the second is empty and without a name, Bitrix automatically assigns his number and everything.
Here is the part of the code that sends for sending data - where does the second "Empty" send go here?
// обращаемся к Битрикс24 при помощи функции curl_exec
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_POST => 1,
CURLOPT_HEADER => 0,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $queryUrl,
CURLOPT_POSTFIELDS => $queryData,
));
$result = curl_exec($curl);
curl_close($curl);
$result = json_decode($result, 1);
if (array_key_exists('error', $result)) echo "Ошибка при сохранении лида: ".$result['error_description']."<br/>";
Answer the question
In order to leave comments, you need to log in
There is nothing unusual in the php code, just sending a request, most likely problems in the bitrix settings
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question