Skip to content

Instantly share code, notes, and snippets.

View abhij89's full-sized avatar

Abhishek jain abhij89

View GitHub Profile
// Creating customer:
$customer = $this->stripeClient->customers->all( [ 'email' => auth()->user()->email ] );
if ( empty( $customer->data[0] ) ) {
// Create new customer
$customer = $this->stripeClient->customers->create( array(
"email" => auth()->user()->email,
"name" => auth()->user()->first_name . ' ' . auth()->user()->last_name,
) );
$customerID = $customer->id;
} else {
@abhij89
abhij89 / temporary-email-address-domains
Last active June 15, 2022 18:14 — forked from adamloving/temporary-email-address-domains
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
Install Redis Support on windows by installing windows alternative: https://www.memurai.com/
Download redis php extension from https://pecl.php.net/package/redis/5.3.2/windows
Go to your xampp/wamp directory, locate php/ext or php/php-version/ext folder and paste php_redis.dll file in it
Edit your php.ini file and add extension=php_redis.dll line into this file
Restart apache
$feed = new SimplePie();
// Set your proxy
$feed->set_curl_options(
array(
CURLOPT_PROXY => "proxy-url-here",
CURLOPT_PROXYUSERPWD => 'proxy-username-password'
)
);
// Set which feed to process.
@abhij89
abhij89 / InstagramGraphLogin.php
Last active November 11, 2021 09:31
Instagram Connect, get User Info
<?php
class InstagramGraphLogin {
/*
* Facebook Object
*/
private $fb;
/*
@abhij89
abhij89 / scrapper.php
Created April 14, 2018 19:36
Quick php code for scrapping images
<?php
// For no time limit
set_time_limit(0);
$url = "url-to-external-page";
$pagecontent = file_get_contents($url);
$dom = new DOMDocument();
$dom->loadHTML($pagecontent);