B
B
BonBon Slick2017-01-26 09:34:25
Windows Server
BonBon Slick, 2017-01-26 09:34:25

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';
    }
  }


However, when putting the site on Hostinger, the Ajax request will return an error:
Resource Limit Exceeded

The website is temporarily unable to service your request as it exceeded resource limit. Please try again later.


How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Apokin, 2017-01-27
@AAApokin

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 question

Ask a Question

731 491 924 answers to any question