cURL Callback Function

Usually we get cURL response from curl_exec(). But we have options to get the output using callback functions. We can set callback function for both header and body output. Here is an example: //Init curl session $ch = curl_init(); //Set URL curl_setopt($ch, CURLOPT_URL, ‘’); // Set callback function for headers curl_setopt($ch, CURLOPT_HEADERFUNCTION, ‘read_header’); // Set [...]