Home  >  Article  >  Backend Development  >  php中利用post传递字符串重定向的实现代码_php技巧

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

WBOY
WBOYOriginal
2016-05-17 09:20:03894browse
复制代码 代码如下:

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