Skip to content

Instantly share code, notes, and snippets.

View aligajani's full-sized avatar
:octocat:
Working from home

Ali Gajani aligajani

:octocat:
Working from home
View GitHub Profile
@aligajani
aligajani / Base64_Encryption.php
Last active September 14, 2015 18:36
Base64 with Encryption
<?php
namespace Gajani;
class Base64_Encryption {
public static function aes128Encrypt($key, $data) {
if(16 !== strlen($key)) $key = hash('MD5', $key, true);
$padding = 16 - (strlen($data) % 16);
$data .= str_repeat(chr($padding), $padding);
@aligajani
aligajani / getStripeCustomersViaEmail.php
Created August 31, 2017 00:10
Retrieve Stripe Customers via email
<?php
$email = "your_email_query_here";
try {
$client = $client = new \GuzzleHttp\Client();
$client->setDefaultOption('verify', true);
$httpResource = 'https://api.stripe.com/v1/search?query="'.$email.'"&prefix=false';
$request = $client->get($httpResource, [