如何使用curl将数据发送到在线网站中的特定位置


how to send the data to a specific place in a online website using curl?

我想把文本区的内容发送到这个网站,但我总是得到的要么是找不到操作,要么是网站的代码。。

$url = "http://www.browxy.com/";
function get_data($url , $data) {
  $ch = curl_init($url);
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_POST, true);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  $res =  curl_exec($ch);
  if($res){
      return $res;
  }
  else {
      return false;
  }
 curl_close($ch);
}

使用此

包向外部api发出REST请求,这很简单,另一方面确保您有正确的参数