Guest User

Untitled

a guest
Oct 29th, 2018
3,035
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. if (mb_stripos($_SERVER['HTTP_USER_AGENT'], 'yandex.com', 0, 'utf-8') !== false) {
  2. $load = sys_getloadavg();
  3. if ($load[0] > 2) {
  4. header('HTTP/1.1 503 Service Temporarily Unavailable');
  5. header('Status: 503 Service Temporarily Unavailable');
  6. header('Retry-After: 3600');
  7. die();
  8. }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment