I need to run this whole function in background, because it takes a long time to finish and so it's getting a timeout on cloudflare server. I tried more exec codes for run, but its need to get the $id
with it then only it works on work.php. So i am now trying for background this whole function then may be its work.
function pancal($id) {
for($i = 1; $i < 4; $i++) {
_req('http://' . $_SERVER[HTTP_HOST] . '/work.php?cod=' . $id);
}
print 'Success';
}