php curl delete request

Solutions on MaxInterview for php curl delete request by the best coders in the world

showing results for - "php curl delete request"
Ida
29 Oct 2018
1public function curl_delete($url)
2{
3    $ch = curl_init();
4    curl_setopt($ch, CURLOPT_URL, $url);
5    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
6    $result = curl_exec($ch);
7    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
8    curl_close($ch);
9    return $result;
10}
11