How convert linux command CURL to PHP

前端 未结 3 1222
再見小時候
再見小時候 2021-01-24 08:22

I want to convert this linux command console to PHP code, to send data via curl,

curl -X POST -d \'data[][street]=1\' link.....

Thanks!!

3条回答
  •  萌比男神i
    2021-01-24 08:59

    You can use PHP cURL Library.

         'value1')));
    
        // receive server response ...
        curl_setopt($connection, CURLOPT_RETURNTRANSFER, true);
    
        $server_output = curl_exec ($connection);
    
        curl_close ($connection);
    
        ?>
    

提交回复
热议问题