📜  php curl post - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:03.280000             🧑  作者: Mango

代码示例3
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
$result = curl_exec($ch);
curl_close($ch);
//check the result
var_dump($result);