Skip to content

Instantly share code, notes, and snippets.

View RedSparr0w's full-sized avatar
〽️
☺☻

Danial RedSparr0w

〽️
☺☻
View GitHub Profile
@RedSparr0w
RedSparr0w / discord-proxy.php
Created October 20, 2020 00:38
[PHP] Discord Proxy
<?php
require('../session.php');
ini_set('max_execution_time', 30); // 30 seconds maximum execution time
define('OAUTH2_CLIENT_ID', YOUR_DISCORD_CLIENT_ID_HERE);
define('OAUTH2_CLIENT_SECRET', YOUR_DISCORD_CLIENT_SECRET_HERE);
define('OAUTH2_REDIRECT_URI', (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http') . '://' . $_SERVER[HTTP_HOST] . strtok($_SERVER['REQUEST_URI'], '?'));
$authorizeURL = 'https://discord.com/api/oauth2/authorize';