View file siwap.ru/AJAX/randQuotes.php
<?php require_once($_SERVER['DOCUMENT_ROOT'].'/system/App.php'); $quotes = Base::query('SELECT `text` FROM `quotes` ORDER BY RAND() LIMIT 1'); if(!empty($quotes['text'])) { $json = ['comment' => $quotes['text']]; } else { $json = ['comment' => '']; } echo json_encode($json, JSON_UNESCAPED_UNICODE); ?>