activate_helper.php
463 Bytes
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
if(!function_exists('activate')) {
function activate($url) {
return uri_string() == $url;
}
}
if(!function_exists('api')) {
function api($url) {
$CI = &get_instance();
$url = $CI->config->item('apiBaseUrl') . $url;
$result = file_get_contents($url);
$json = json_decode($result);
$ret = $json->data;
return $ret;
}
}