Skip to content

Instantly share code, notes, and snippets.

View danielsebesta's full-sized avatar
👋
Hi there!

Daniel Šebesta danielsebesta

👋
Hi there!
View GitHub Profile
@danielsebesta
danielsebesta / index.php
Last active May 4, 2022 19:04 — forked from Jengas/index.php
Discord OAuth2 in PHP >> with working logout
<?php
define('OAUTH2_CLIENT_ID', 'Your client ID');
define('OAUTH2_CLIENT_SECRET', 'Very secret client secret!!');
$authorizeURL = 'https://discord.com/api/oauth2/authorize';
$tokenURL = 'https://discord.com/api/oauth2/token';
$apiURLBase = 'https://discord.com/api/users/@me';
$revokeURL = 'https://discord.com/api/oauth2/token/revoke';
session_start();
@danielsebesta
danielsebesta / .htaccess
Created December 26, 2023 09:02 — forked from ludo237/.htaccess
The ultimate .htaccess file. Please feel free to fork it, edit it and let me know what do you think about it.
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com
# This is the free sample of .htaccess from 6GO s.r.l.
# @author Claudio Ludovico Panetta (@Ludo237)