Skip to content

Instantly share code, notes, and snippets.

View Kudratullah's full-sized avatar

Kudratullah Kudratullah

View GitHub Profile
@Kudratullah
Kudratullah / envato-purchase-verification.php
Created December 14, 2020 20:52 — forked from obiPlabon/envato-purchase-verification.php
Envato purchase verification using `wp_remote_get`
<?php
$token = '***********';
$code = '*************';
$response = wp_remote_get(
'https://api.envato.com/v3/market/buyer/purchase?code=' . $code,
[
'headers' => [
'Authorization' => 'Bearer ' . $token,
@Kudratullah
Kudratullah / cookie_helper.php
Created December 15, 2020 07:17
PHP Cookie Helper
@Kudratullah
Kudratullah / wp-backup.sh
Last active March 10, 2022 12:00
WordPress Backup Bash Script
#!/bin/bash
# Set environment
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Status Output Functions.
RED_BOLD='\033[1;31m'
GREEN_BOLD='\033[1;32m'
BLUE_BOLD='\033[1;34m'
YELLOW_BOLD='\033[1;33m'
<?php
/**
*
* Retrieves the date, in specified timezone and format.
*
* @param int|string $timestamp Unix timestamp.
* @param string $timezone GMT Offset or timezone string to output result in.
* E.G. +0400 or Asia/Dubai, +0630 or Asia/Dhaka etc.
* @param string $format Optional. PHP date format.