Home > php教程 > php手册 > body text

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

WBOY
Release: 2016-06-06 20:36:42
Original
1361 people have browsed it

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;
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!