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 | |
$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 |
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 | |
/** | |
* @author Melvin Tercan | |
* @link http://twitter.com/melvinmt | |
**/ | |
class Geo{ | |
public static function bounds($mylat, $mylon, $dist = 100, $unit = 'km', $pyth_invert = true){ | |
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 | |
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){ |
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 | |
require_once('Tinypayme.php'); | |
$t = new Tinypayme($mashape_api_key); | |
$request = $t->getCurrencies(); | |
foreach ($request->result as $currency){ |
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 | |
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); |
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 | |
require_once('Tinypayme.php'); | |
$t = new Tinypayme($mashape_api_key); | |
$code = $_GET['code']; | |
$request = $t->getOAuthAccessToken(YOUR_ACCESS_TOKEN, $code); |
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 | |
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]; |
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 | |
// 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"); |
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 | |
// 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); |
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 | |
// 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