Skip to content

Instantly share code, notes, and snippets.

Melvin Tercan melvinmt

Block or report user

Report or block melvinmt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:849469
<?php
require_once('Tinypayme.php');
$t = new Tinypayme($mashape_api_key);
$request = $t->createItem(
$access_token = $access_token,
$title =stripslashes($data['title']),
$currency = $data['currency'],
View gist:849482
<?php
require_once('phpFlickr.php');
$f = new phpFlickr($flickr_api_key, $flickr_api_secret);
$f->auth("read");
?>
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:849351
<?php
require_once('Tinypayme.php');
$t = new Tinypayme($mashape_api_key);
$code = $_GET['code'];
$request = $t->getOAuthAccessToken(YOUR_ACCESS_TOKEN, $code);
View gist:849348
<?php
require_once('Tinypayme.php');
$t = new Tinypayme($mashape_api_key);
$request = $t->getCurrencies();
foreach ($request->result as $currency){
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: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);
@melvinmt
melvinmt / Geo::bounds
Created Nov 15, 2010
PHP class to calculate south-west and north-east bounds given a longitude, latitude and distance edit
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){
@melvinmt
melvinmt / MoneyMedic Kassa Voorbeeld
Created Nov 11, 2010
In dit voorbeeld wordt er veilig in PHP een Kassa URL gegenereerd, zodat deze gegevens niet te zien zijn in de broncode
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
You can’t perform that action at this time.