Skip to content

Instantly share code, notes, and snippets.

@azhurb
Created April 28, 2016 14:34
Show Gist options
  • Select an option

  • Save azhurb/0b375de66a80d502c158a4e9a913c7f5 to your computer and use it in GitHub Desktop.

Select an option

Save azhurb/0b375de66a80d502c158a4e9a913c7f5 to your computer and use it in GitHub Desktop.
Access filter
<?php
// http://dev.maxmind.com/geoip/legacy/codes/iso3166
/* @var $country */
/* @var $model */
/* @var $mac */
/* @var $serial_number string */
/* @var $version */
/* @var $device_id */
/* @var $signature */
/* @var $rnd */
use Stalker\Lib\Core\Mysql;
$stb = Mysql::getInstance()->from('users')->where(array('mac' => $mac))->get()->first();
if (!empty($stb)){
if (!$stb['device_id']){
return array(
'result' => false,
'message' => 'Your STB is blocked'
);
}
}
return true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment