php中利用post传递字符串重定向的实现代码
(编辑:jimmy 日期: 2024/11/30 浏览:3 次 )
复制代码 代码如下:
$ch = curl_init('http://domain-name.com/page.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "FORM_ID=295&NAME=$_POST[NAME]&EMAIL=$_POST[EMAIL]&PHONE=$_POST[PHONE]&DESCRIPTION=$_POST[DESCRIPTION]");
curl_exec($ch);
curl_close($ch);
exit;
$ch = curl_init('http://domain-name.com/page.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "FORM_ID=295&NAME=$_POST[NAME]&EMAIL=$_POST[EMAIL]&PHONE=$_POST[PHONE]&DESCRIPTION=$_POST[DESCRIPTION]");
curl_exec($ch);
curl_close($ch);
exit;
下一篇:php将fileterms函数返回的结果变成可读的形式