php curl post parameters not passed to server
Posted
by user121196
on Stack Overflow
See other posts from Stack Overflow
or by user121196
Published on 2010-06-02T17:20:23Z
Indexed on
2010/06/02
17:24 UTC
Read the original article
Hit count: 283
<?php $data = array('name' => 'Ross', 'php_master' => true); $url="http://localhost/test.php"; $handle = curl_init($url); curl_setopt($handle, CURLOPT_POST, true); curl_setopt($handle, CURLOPT_POSTFIELDS, $data); curl_exec($handle); ?>
the $_POST variable on server side is empty, I also tried using java servlet, request.getParameterNames() is also empty. why are the post parameters lost?
© Stack Overflow or respective owner