<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
swayoleg / mvcr-trvaly-pobyt-lang-exam-online-prihlaska-notify example snippets
$configExample = [
'notify' => [
'telegram',
//'email',
//'webhook'
],
'notify_options' => [
'telegram' => [
// can be a lot of chats
'chats' => [
'%YOURCHATIDHERE%',
'%YOURCHATIDHERE%'
],
'token' => '%TELEGRAMTOKEN%', //
],
'email' => [
// can be multiply
'sendTo' => [
'[email protected]'
],
'subject' => 'New exam spot',
'from' => '[email protected]',
'replyTo' => '[email protected]',
],
'webhook' => [
// Can be a lot of urls
'urls' => [
'%YOUR URL HERE%'
]
]
],
'url' => 'https://cestina-pro-cizince.cz/trvaly-pobyt/a2/online-prihlaska/',
'noTermsText' => ['Nedostupná', 'Obsazeno'],
'downloader' => 'curl', // Can be "guzzle", "file" or "curl"
'domParser' => 'xpath',
'sendNotificationIfNoElementsFound' => false, // This will notify you if there is no disabled links found - for example in case if DOM scruture is changed.
'message' => 'New Exam place Exists!' . PHP_EOL . 'Go for it: https://cestina-pro-cizince.cz/trvaly-pobyt/a2/online-prihlaska/', // Message to send
'errorMessage' => 'No xpath elements found',
];
$checker = new \Swayoleg\CestinaCheck\OnlinePrihlaskaChecker($configExample);
$checker->check();
$configExample = [
'notify' => [
'webhook',
],
'notify_options' => [
'webhook' => [
'urls' => [
'%YOUR URL HERE%'
]
]
],
'sendNotificationIfNoElementsFound' => false, // This will notify you if there is no disabled links found - for example in case if DOM scruture is changed.
'message' => 'New Exam place Exists!' . PHP_EOL . 'Go for it: https://cestina-pro-cizince.cz/trvaly-pobyt/a2/online-prihlaska/', // Message to send
'errorMessage' => 'No xpath elements found',
'url' => 'https://cestina-pro-cizince.cz/trvaly-pobyt/a2/online-prihlaska/',
'noTermsText' => ['Nedostupná', 'Obsazeno'],
'downloader' => 'curl', // Can be "guzzle", "file" or "curl"
'domParser' => 'xpath',
];
$configExample = [
'notify' => [
'telegram',
],
'notify_options' => [
'telegram' => [
'chats' => [
*chat Id*, // TELEGRAM int chat ID here
],
'token' => '*token*', // TELEGRAM TOKEN HERE
],
],
'sendNotificationIfNoElementsFound' => false, // This will notify you if there is no disabled links found - for example in case if DOM scruture is changed.
'message' => 'New Exam place Exists!' . PHP_EOL . 'Go for it: https://cestina-pro-cizince.cz/trvaly-pobyt/a2/online-prihlaska/', // Message to send
'errorMessage' => 'No xpath elements found',
'url' => 'https://cestina-pro-cizince.cz/trvaly-pobyt/a2/online-prihlaska/',
'noTermsText' => ['Nedostupná', 'Obsazeno'],
'downloader' => 'curl', // Can be "guzzle", "file" or "curl"
'domParser' => 'xpath',
];
apacheconf
de (__DIR__ . DIRECTORY_SEPARATOR . 'config.php');
$checker = new \Swayoleg\CestinaCheck\OnlinePrihlaskaChecker($config);
$checker->check();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.