我想知道如何将表单详细信息发送到外部 url 以及电子邮件 ID。我有将表单详细信息发送到电子邮件 ID 的编程经验,但是我的一个客户要求将表单详细信息的副本重定向到 url,就像这样http://someipaddress.com/XDKRT/SalLeadEntWeb.ASP,我的网站是由wordpress开发的,谁能指导我如何实现这个?,我知道使用CURL我们可以实现这个,但是在哪里添加CURL?我的 php 动作表单是这样的:
<?php ob_start(); ?>
<?php
$contact_name = $_POST['name'];
$contact_email = $_POST['email'];
$contact_phone = $_POST['phone'];
$contact_message = $_POST['message'];
if( $contact_name == true )
{
$sender = $contact_email;
$receiver = 'info@compositedge.com' . ',referral@compositeinvestments.com'; // note the comma
$client_ip = $_SERVER['REMOTE_ADDR'];
$email_body = "Name: $contact_name \nEmail: $contact_email \nPhone No: $contact_phone \nMessage: $contact_message \n";
$extra = "From: info@compositedge.com\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();
if( mail( $receiver, "Open an Account - Download and Print", $email_body, $extra ) )
{
//IF SUCCESSFUL, REDIRECT
header("Location: http://www.mydomain.com/?page_id=1112");
}
else
{
echo "success=no";
}
}
?>
<?php ob_flush(); ?>
请求帮助我,在哪里添加 CURL?