php中利用post传递字符串重定向的实现代码


复制代码 代码如下:

$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;

« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3