*Here is the code to send data from one domain to another using curl in php* `$url='http://training3.mbincbs.com/karma/phpcontact.php';
$s = curl_init();
curl_setopt($s,CURLOPT_URL, $url);
curl_setopt($s, CURLOPT_POST, 1);
curl_setopt($s, CURLOPT_POSTFIELDS,
"contactmessage=".$message."&contactname=".$name."&contactemail=".$email."&contactsubject=".$subject);
curl_setopt($s, CURLOPT_RETURNTRANSFER, true);
回声 $server_output = curl_exec($s); curl_close($s);
phpcontact.php
`$Name = $_POST["contactname"];
`$Email = $_POST["contactemail"];
`$Subject = $_POST["contactsubject"];
`$Message = $_POST["contactmessage"];
如果(isset($链接)){
$sql="INSERT INTO Contact (contactname,contactemail,contactsubject,contactmessage) VALUES ('$Name','$Email','$Subject', '$Message')"; $res=mysqli_query($link,$sql);