Answer the question
In order to leave comments, you need to log in
Resource Limit Exceeded - Hostinger - Laravel 5.3 Ajax Request?
Everything works on the local Openserver server, here is the code that should work on an adjax request:
public function urlCheck(Request $request)
{
$imgUrl = $request->imgUrl;
$agent = "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; pt-pt) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27";
$curlSess=curl_init();
curl_setopt ($curlSess, CURLOPT_URL,$imgUrl );
curl_setopt($curlSess, CURLOPT_USERAGENT, $agent);
curl_setopt ($curlSess, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($curlSess,CURLOPT_VERBOSE,false);
curl_setopt($curlSess, CURLOPT_TIMEOUT, 5);
curl_exec($curlSess);
$httpcode = curl_getinfo($curlSess, CURLINFO_HTTP_CODE);
curl_close($curlSess);
if($httpcode >= 200 && $httpcode < 300)
{
return '1';
}
else
{
return '0';
}
}
Resource Limit Exceeded
The website is temporarily unable to service your request as it exceeded resource limit. Please try again later.
Answer the question
In order to leave comments, you need to log in
Not the best hosting. Is it a hosting limitation by any chance?
In those. did you write support?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question