【发布时间】:2018-01-04 19:16:54
【问题描述】:
我需要使用 CURL 将以下代码插入 POST:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.bmby.com/shared/AddClient/index.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_REFERER, 'http://xxxxxxxx/');
$data = [
'ProjectID' => xxxx
'Password' => 'xxxxxx',
'Fname' => $_POST['your-name'],
'Email' => $_POST['email'],
'Phone' => $_POST['your-tel'],
#'Esse' => $_POST['msg'],
'Referal' => 'http://xxxxxxxx/',
'MediaTitle' => 'אתר אינטרנט ראשי',
'AllowedMail' => 2, # 0 = allow, 2 = don't allow
'IP' => $_SERVER['REMOTE_ADDR'],
];
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$output = curl_exec($ch);
关于如何实现这一点以及我们创建的表单与上述代码相关的任何指导,以便我们用于从表单中收集所有潜在客户的服务可以获得所需的信息。
【问题讨论】: