我有一个salesforce表单,它将表单数据发送到salesforce_url。我正在实现一个表单处理程序。如何在表单处理程序中将数据发送到salesforce url。在基本形式中,它将通过发送
<form action="salesforce-url" method="POST" role="form">
现在有了表单处理程序,我将操作设置为:
<form action="/form-handler.php" method="POST" role="form">
在form-handler.php的表单处理程序中,如何将数据推送到https://www.salesforce.com.
附言:使用谷歌captcha,将自动填充某些表单变量,以增加复杂性。下面是我的表单处理程序。。。
<?php
$email;$comment;$captcha;
if(isset($_POST['email'])){
$email=$_POST['email'];
}if(isset($_POST['g-recaptcha-response'])){
$captcha=$_POST['g-recaptcha-response'];
}
if(!$captcha){
echo '<h2>Please check the the captcha form.</h2>';
exit;
}
$response=file_get_contents("https://www.example.com/recaptcha/api/siteverify?secret=-YA-&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']);
if($response.success==false)
{
echo '<h2>Please no spam, thank you.</h2>';
}else
{
header("Location: http://example.com/form-success/");
}
?>
您可以将数据卷曲到远程数据库中。http://davidwalsh.name/curl-post