I am using laravel job and when job triggered need to execute the curl.
If I used the queue:work then curl is not working. But If I use the queue:listen then curl is working. Anyone know the solution for this?
This is my CURL code
$curl = curl_init();
curl_setopt($curl,CURLOPT_URL, 'www.google.lk');
curl_setopt($curl,CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl,CURLOPT_ENCODING, "");
curl_setopt($curl,CURLOPT_MAXREDIRS, 10);
curl_setopt($curl,CURLOPT_TIMEOUT, 0);
curl_setopt($curl,CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl,CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($curl, CURLOPT_HTTPHEADER, []);
curl_setopt($curl, CURLOPT_COOKIEFILE, "-");
var_dump(curl_exec($curl));