当前位置:首页 > PHP教程 > PHP高级教程

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;

【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!