Post data using curl

Accepts data as associative array and posts it to specified URL.

fork add to bundle source
function curl_post($url, $data) { $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_POST => 1, CURLOPT_POSTFIELDS => http_build_query($data), CURLOPT_RETURNTRANSFER => true ]); return curl_exec($ch); }


load_function('curl_post'); curl_post('', ['variable' => 'value']); // Will send POST request and return result
← how to use this in app?
create log ...inout