I want to run a function as background process using curl. Below is my code.
foreach ($iles $file=> $size) {
$params ="file=$file&fullpath=$fullpath&minWidth=$minWidth";
$url = 'http://test.rul.com/file/listFiles?'.$params;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$curled=curl_exec($ch);
curl_close($ch);
}
}
public function getlistFiles() {
$fullpath = $_REQUEST['fullpath'];
}
but this curl is not running on background. how can I execute this as background ?