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
import java.io.UnsupportedEncodingException; | |
import java.math.BigInteger; | |
import java.net.URLEncoder; | |
import java.security.InvalidKeyException; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.Map; | |
import java.util.HashMap; | |
import javax.crypto.Mac; | |
import javax.crypto.spec.SecretKeySpec; |
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
#!/usr/bin/python | |
import hmac | |
from hashlib import sha1 | |
import urllib | |
def urlbox(key, secret, url, args): | |
qs = urllib.urlencode(dict(url=url, **args)) |
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
require 'cgi' | |
require 'openssl' | |
require 'open-uri' | |
def urlbox(url, options={}) | |
urlbox_apikey = 'xxx-xxx' | |
urlbox_secret = 'xxx-xxx' | |
query = { | |
:url => url, |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Security.Cryptography; | |
using System.Text; | |
public class Urlbox | |
{ | |
public string urlGenerator(string url) |
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 | |
function urlbox($url, $args) | |
{ | |
$URLBOX_APIKEY = "xxx-xxx"; | |
$URLBOX_SECRET = "xxx-xxx"; | |
$options['url'] = urlencode($url); | |
$options += $args; | |
foreach ($options as $key => $value) { |