Download the PHP package swayoleg/mvcr-trvaly-pobyt-lang-exam-online-prihlaska-notify without Composer

On this page you can find all versions of the php package swayoleg/mvcr-trvaly-pobyt-lang-exam-online-prihlaska-notify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mvcr-trvaly-pobyt-lang-exam-online-prihlaska-notify

What is it project for?

In Czech republic to get permanent visa you need to get language exam. And there is a big problem to get term and register - they have always no spots. To get a spot for lang exam you need to go here https://cestina-pro-cizince.cz/trvaly-pobyt/a2/online-prihlaska/

So what I did its just simple parser that checks free spot and notifies you.

Notification and script options

The notification can be done via telegram, email and webhook. There is two type(styles I would say) to solve the problem. In noOOPJustForFunExample.php you just put the telegram token and chat id - and put the script on a cron. This is my style to solve one-time issues - just get it done.

BUT its not a cool and corporate style - right? So real "for fun" was to create script that can send notification with different type, can operate via guzzle or curl by config, can be extended - bla bla bla.

Installation

Composer

Coffee

If you want to by me a coffee - just do it:

Usage

I like to use it like this

where config.php looks like this - config_example.php

Or use the parser_example.php

So if you are novice in this lets go with config. Use parser_example.php file.

If you need to send notification to your BE with webhook use this config:

It will send simple GET request to your url with urlEncoded 'message' GET param.

Telegram notification sending

If you need to send it via telegram - create bot with @BotFather. telegram bot. Get your token. It will be right after this line Use this token to access the HTTP API:

To get your int id of telegram the fastest way is to write to @userinfobot. It will respond like this:

In the nnnnnnnn place you will get your chat Id for config.

So set config like this:

If your file_get_contents function is allowed to open urls you can use 'downloader' => 'file' as an option. Other options are curl or guzzle.

Other Options:

url - the actually url for parsing

errorMessage - what should we send if xPath didnt find any links. Works only with sendNotificationIfNoElementsFound = true

sendNotificationIfNoElementsFound - flag if we need to send message if parser cant find the links at all (I mean document structure might be changed)

domParser - leave it for now. If you want another parser add it to src/Dom and implement Swayoleg\CestinaCheck\Dom\ParserInterface

downloader - if you use file it uses simple file_get_contents php function - so url open should be allowed. curl uses ext-curl and guzzle use guzzlehttp/guzzle package

noTermsText - Text on the btn which means that there is no terms. Array param from 1.0.1 version

Multiply notifications

Yes it works. You can use webhook email and telegram notification types same time, and multipy urls, chats and emails as well.

ChangeLog

1.0.1 noTermsText param changed from string to array


All versions of mvcr-trvaly-pobyt-lang-exam-online-prihlaska-notify with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-curl Version *
ext-dom Version *
guzzlehttp/guzzle Version ^7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package swayoleg/mvcr-trvaly-pobyt-lang-exam-online-prihlaska-notify contains the following files

Loading the files please wait ....