This file contains 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 | |
// Example app consumer secret found in apps.twitter.com | |
const APP_CONSUMER_SECRET = 'z3ZX4v7mAAUGykl3EcmkqbartmuW8VFOOzCloLx9Q45P0hLrFu'; | |
// Example token provided by incoming GET request | |
$token = $_GET['crc_token']; | |
/** | |
* Creates a HMAC SHA-256 hash created from the app TOKEN and | |
* your app Consumer Secret. | |
* @param token the token provided by the incoming GET request |
This file contains 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
__author__ = 'Damon Pollard (@DamonLPollard)' | |
import re | |
import random | |
import json | |
import requests | |
WLID_USERNAME = "user@example.com" | |
WLID_PASSWORD = "password" |
This file contains 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
/* | |
* using curl | |
*/ | |
$key = 'YOUR_KEY_HERE'; | |
$secret = 'YOUR_SECRET_HERE'; | |
$api_endpoint = 'https://api.twitter.com/1.1/users/show.json?screen_name=marcosfernandez'; // endpoint must support "Application-only authentication" | |
// request token | |
$basic_credentials = base64_encode($key.':'.$secret); |
This file contains 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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |