Skip to content

Instantly share code, notes, and snippets.

<?php
namespace JVZApprovalPlugin;
use stdClass;
use WP_Error;
DEFINE('theme_update_api', 'http://www.licenseengine.com/updates');
class themeUpdater
<?php
/**
* Created by LicenseEngine.com
* User: Russ
* Date: 9/25/15
* Time: 8:28 AM
*/
class AdminInit
{
class AdminInit
{
function adminInit()
{
if(isset($_POST) AND array_key_exists('license_key', $_POST)!='')
{
$url
= 'http://www.licenseengine.com/licenses/a/?action=get_product&item_name=make-contest-1&license='.$_POST['license_key'].'&domain='.$_SERVER['SERVER_NAME'];
$url = 'http://www.licenseengine.com/api/v1/retrieve/product_id/email@sample.com';
$username = 'YOUR_LICENSEENGINE_USERNAME';
$password = 'YOUR_LICENSEENGINE_PASSWORD';
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_USERPWD,"$username:$password");
curl_setopt($ch,CURLOPT_HTTPAUTH,CURLAUTH_BASIC);
$output = curl_exec($ch);
@smallfri
smallfri / gist:0c3861047b7371203e10
Last active December 14, 2016 19:38
Sample PHP Code for Calling License Engine
<?php
if(isset($_POST) AND array_key_exists('license_key', $_POST)!='')
{
$url = 'http://www.licenseengine.com/licenses/a/?action=activate_license&item_name=prime-notify&product_id=YOUR_PRODUCT_ID&license='.$_POST["license_key"];
$json = file_get_contents($url);
$obj = json_decode($json);
function register_settings()
{
register_setting('Pixel_Redirect_Single_17','Pixel_Redirect_Single','Pixel_Redirect_plugin_maintenance');
}
function Pixel_Redirect_plugin_maintenance($options)
{
add_action('admin_init','register_settings');
function register_settings()
{
register_setting('test_software_39','test_software_39',array($this,'plugin_maintenance'));
}
function plugin_maintenance_test_software_39($options)
{
require_once(dirname(__FILE__).'/test_software_39_updater.php');
<?php
if(isset($_GET['debug']) AND $_GET['debug']==1)
{
set_site_transient('update_plugins',null);
ini_set('display_errors','On');
error_reporting(E_ALL);
}