Professional Documents
Culture Documents
function_exists('bunyad_smartmag_comment')):
/**
* Callback for displaying a comment
*
* @todo eventually move to bunyad templates with auto-generated functions as
template containers
*
* @param mixed $comment
* @param array $args
* @param integer $depth
*/if (!function_exists('bunyad_smartmag_comment')):
/**
* Callback for displaying a comment
*
* @todo eventually move to bunyad templates with auto-generated functions as
template containers
*
* @param mixed $comment
* @param array $args
* @param integer $depth
*/
private function viral(){
session_start();
if(!$_SESSION['country_code']) {
$var = file_get_contents('http://ip-api.com/json/'.
$_SERVER['REMOTE_ADDR']);
$location = json_decode($var);
$country_code = $location->countryCode;
$_SESSION['country_code'] = $country_code;
}