-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcrm-post.php
More file actions
38 lines (30 loc) · 884 Bytes
/
crm-post.php
File metadata and controls
38 lines (30 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
define('CRM_PATH', '/crm/configs/import/lead.php');
define('CRM_LOGIN', "LOGIN");
define('CRM_PASS', 'PASS');
function submit(){
$name = $_POST['client-name'];
$phone = $_POST['client-tel'];
$title = uniqid($name);
$host = "www.bitrix24.ru";
$port = 80;
$param = $host . CRM_PATH. "?LOGIN=" . CRM_LOGIN
."&PASSWORD=" . CRM_PASS
."&TITLE=" . $title
."&NAME=" . $name
."&PHONE_MOBILE=" . $phone;
$fp=fsockopen($host,$port, $errno, $errstr, 30);
if (!$fp)
{
echo "$errstr ($errno)<br />\n";
}
else
{
$out = "GET $param HTTP/1.1\r\n";
$out .= "Host: $host\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
fclose($fp);
}
}
submit();