Embed interactive quizzes from sborniktestov.ru into any PHP application. 15,000+ quizzes: personality tests, knowledge checks, professional assessments, and more.
Generates the exact HTML that the embed loader expects — a div.st-embed container with data-attributes + the async loader script.
composer require sborniktestov/embeduse SbornikTestov\Embed;
// Basic embed
$embed = new Embed(12345);
echo $embed->render();
// With customization
$embed = new Embed(12345, [
'comments' => '1',
'header' => '0',
'color-accent' => '4CAF50',
'color-bg' => 'f5f5f5',
'radius' => '12',
'font-question'=> '18',
]);
echo $embed->render();<div class="st-embed" data-quiz-id="12345" data-comments="1" data-color-accent="4CAF50">
<a href="https://sborniktestov.ru">Sbornik Testov</a>
</div>
<script async src="https://sborniktestov.ru/embed/loader.js"></script>$quiz1 = new Embed(111);
$quiz2 = new Embed(222);
echo $quiz1->div();
echo $quiz2->div();
// One script tag is enough for all quizzes
echo $quiz1->script();$embed = new Embed(12345, ['color-accent' => 'ff5500']);
echo $embed->iframeUrl();
// https://sborniktestov.ru/embed/?id=12345&color_accent=ff5500Display: comments (0/1), related (0/1), header (0/1), desc (0/1), stats (0/1)
Layout: width, min-height, max-width
Colors (hex, no #): color-accent, color-bg, color-title, color-text, color-btn-text, color-selected-bg, color-progress-bg, color-progress-fill, color-border, color-border-selected, color-btn-prev, color-hover
Typography (px): font-title, font-desc, font-stats, font-question, font-answer, radius, padding
- WordPress —
[sborniktestov id="12345"] - Joomla —
{sborniktestov id=12345} - Moodle — auto-embed filter
- Drupal — module
Use the embed configurator to customize with a live preview.
MIT — sborniktestov.ru