This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once 'config.php'; | |
| $url = "https://zoom.us/oauth/authorize?response_type=code&client_id=".CLIENT_ID."&redirect_uri=".REDIRECT_URI; | |
| ?> | |
| <a href="<?php echo $url; ?>">Login with Zoom</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once 'config.php'; | |
| try { | |
| $client = new GuzzleHttp\Client(['base_uri' => 'https://zoom.us']); | |
| $response = $client->request('POST', '/oauth/token', [ | |
| "headers" => [ | |
| "Authorization" => "Basic ". base64_encode(CLIENT_ID.':'.CLIENT_SECRET) | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once 'vendor/autoload.php'; | |
| require_once "db.php"; | |
| define('CLIENT_ID', 'YOUR_CLIENT_ID'); | |
| define('CLIENT_SECRET', 'YOUR_CLIENT_SECRET'); | |
| define('REDIRECT_URI', 'REDIRECT_URL_FOR_OAUTH'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class DB { | |
| // Database credentials | |
| private $dbHost = "DB_HOST"; | |
| private $dbUsername = "DB_USERNAME"; | |
| private $dbPassword = "DB_PASSWORD"; | |
| private $dbName = "DB_NAME"; | |
| public function __construct(){ | |
| if(!isset($this->db)){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE `token` ( | |
| `id` int(11) NOT NULL AUTO_INCREMENT, | |
| `access_token` text NOT NULL, | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
NewerOlder