<?
$url = 'https://b24.site.ru/crm/configs/import/lead.php';
$postdata = http_build_query(
array(
"LOGIN" => "LEAD_CREATOR",
"PASSWORD" => "fjdk:nG123V@Y{YP",
"TITLE" => "тест123"
)
);
$context = array(
'http' =>
array(
'method' => 'POST',
'header' => 'Content-Type: application/x-www-form-urlencoded',
'content' => $postdata
),
"ssl" => array(
"verify_peer" => false,
"verify_peer_name" => false
)
);
$res = file_get_contents($url, false, stream_context_create($context));
var_dump(json_decode($res, true));
Leave a comment