Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
| {"lastUpload":"2019-10-30T17:50:11.660Z","extensionVersion":"v3.4.3"} |
| <?php | |
| /********* универсальное решение ****************/ | |
| function sendRequest($url, array $params = [], $post = false){ | |
| $curl = curl_init(); | |
| $headers = array( | |
| 'Content-Type: application/json-patch+json', | |
| 'accept: application/json', | |
| ); | |
| if ($post == true) { |
| function parseVideo (url) { | |
| // - Supported YouTube URL formats: | |
| // - http://www.youtube.com/watch?v=My2FRPA3Gf8 | |
| // - http://youtu.be/My2FRPA3Gf8 | |
| // - https://youtube.googleapis.com/v/My2FRPA3Gf8 | |
| // - Supported Vimeo URL formats: | |
| // - http://vimeo.com/25451551 | |
| // - http://player.vimeo.com/video/25451551 | |
| // - Also supports relative URLs: | |
| // - //player.vimeo.com/video/25451551 |
| <?php | |
| /** | |
| * Count the number of working days between two dates. | |
| * | |
| * This function calculate the number of working days between two given dates, | |
| * taking account of the Public festivities, Easter and Easter Morning days, | |
| * the day of the Patron Saint (if any) and the working Saturday. | |
| * | |
| * @param string $date1 Start date ('YYYY-MM-DD' format) |
| # This hosts file is brought to you by Dan Pollock and can be found at | |
| # http://someonewhocares.org/hosts/ | |
| # You are free to copy and distribute this file for non-commercial uses, | |
| # as long the original URL and attribution is included. | |
| #<localhost> | |
| 127.0.0.1 localhost | |
| 127.0.0.1 localhost.localdomain | |
| 255.255.255.255 broadcasthost | |
| ::1 localhost |
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
| <?php | |
| /** | |
| * This program is free software. It comes without any warranty, to | |
| * the extent permitted by applicable law. You can redistribute it | |
| * and/or modify it under the terms of the Do What The Fuck You Want | |
| * To Public License, Version 2, as published by Sam Hocevar. See | |
| * http://sam.zoy.org/wtfpl/COPYING for more details. | |
| */ | |
| /** |