时间:2021-07-01 10:21:17 帮助过:8人阅读
'tanteng' // 'password' => 'password' ); $ch = curl_init (); // print_r($ch); curl_setopt ( $ch, CURLOPT_URL, $uri ); curl_setopt ( $ch, CURLOPT_POST, 1 ); curl_setopt ( $ch, CURLOPT_HEADER, 0 ); curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt ( $ch, CURLOPT_POSTFIELDS, $data ); $return = curl_exec ( $ch ); curl_close ( $ch ); print_r($return);
2,远程服务器:
以上就介绍了使用php curl模拟post请求的小例子。,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。