I am doing a project with laravel, but i got some problems, the big one is that when i pick the back arrow in the navigator while the client is making the get method to the server, the server "crash", i say this because it seems like that, when this happen, i can not go to any pages because it still charging, i do not have ide of the reason.
this is the code where i get the data:
$curlSession = curl_init();
curl_setopt($curlSession, CURLOPT_URL, $url);
curl_setopt($curlSession, CURLOPT_BINARYTRANSFER, true);
curl_setopt($curlSession, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curlSession, CURLOPT_TIMEOUT, 60);
$jsonData = curl_exec($curlSession);
$curl_errno = curl_errno($curlSession);
curl_close($curlSession);
if ($curl_errno > 0) {
return back()
->with('errorConn', true);
}
If someone know how to put a general timeout for this cases, it would help.
Thanks to all.