View MoneyMedic Kassa Voorbeeld
<?php | |
$ch = curl_init(); | |
$post = array( | |
'pay_amount' => 100, | |
'description' => 'Test Betaling', | |
'return_url' => 'http://mijndomein.nl?unieke_id=ABC123', // secret return URL | |
'kassa_secret' => 'MIJN_KASSA_SECRET', // you can find this in the advanced section | |
'no_redirect' => 1 // doesn't redirect to the kassa page, but prints the URL instead |
View Geo::bounds
<?php | |
/** | |
* @author Melvin Tercan | |
* @link http://twitter.com/melvinmt | |
**/ | |
class Geo{ | |
public static function bounds($mylat, $mylon, $dist = 100, $unit = 'km', $pyth_invert = true){ | |
View gist:849345
<?php | |
require_once(‘phpFlickr.php’); | |
$f = new tinyFlickr($flickr_api_key, $flickr_api_secret); | |
$request = $f->people_getPhotos($user_id); | |
foreach ($request['photos']['photo'] as $photo){ |
View gist:849348
<?php | |
require_once('Tinypayme.php'); | |
$t = new Tinypayme($mashape_api_key); | |
$request = $t->getCurrencies(); | |
foreach ($request->result as $currency){ |
View gist:849349
<?php | |
require_once('Tinypayme.php'); | |
$t = new Tinypayme($mashape_api_key); | |
$redirect_uri = 'http://example.com/path/to/process.php'; | |
$permission = 'create_items'; | |
$request = $t->getOAuthPermission($marketplace_id, $redirect_uri, $permission); |
View gist:849351
<?php | |
require_once('Tinypayme.php'); | |
$t = new Tinypayme($mashape_api_key); | |
$code = $_GET['code']; | |
$request = $t->getOAuthAccessToken(YOUR_ACCESS_TOKEN, $code); |
View gist:849454
<?php | |
require_once('phpFlickr.php'); | |
$f = new tinyFlickr($flickr_api_key, $flickr_api_secret); | |
$request = $f->photos_getSizes($photo['id']); | |
// assume that largest size comes last: | |
$large = $request[count($request)-1]; |
View gist:849455
<?php | |
// first, save medium image | |
$ch = curl_init($medium['source']); | |
$medium_local_path = UPLOAD_DIR.'/'.time().'_'.basename($medium['source']); | |
$parse = parse_url($medium_local_path); | |
$medium_local_path = $parse['path']; // clean up dirty query strings from file name | |
$fh = fopen($medium_local_path, "w"); |
View gist:849461
<?php | |
// construct upload url | |
$upload_url = 'https://tinypay.me/mashape'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_VERBOSE, 0); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
View gist:849462
<?php | |
// construct upload url | |
$upload_url = 'https://tinypay.me/mashape'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_VERBOSE, 0); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
OlderNewer