Last active
August 27, 2015 14:49
-
-
Save iomarmochtar/6747fe6920b8b8670a53 to your computer and use it in GitHub Desktop.
ClearOS warning page for e2guardian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function index($info) | |
//function index($info, $reason) | |
{ | |
// Load dependencies | |
//------------------ | |
$this->load->library('content_filter/DansGuardian'); | |
$this->lang->load('content_filter'); | |
$dd = array(); | |
$konten = base64_decode($info); | |
foreach(explode('::', $konten) as $x){ | |
// jika sudah didapatkan key yang ingin dicari | |
if (array_key_exists('url', $dd) && array_key_exists('reason', $dd)) | |
break; | |
$pecah = explode('==', $x); | |
// jika tidak ada key maka itu adalah url | |
if (count($pecah) == 1){ | |
$dd['url'] = ltrim($x,"="); | |
} | |
else if ($pecah[0] == 'REASON'){ | |
$dd['reason'] = $pecah[1]; | |
} | |
} | |
$url = base64_encode($dd['url']); | |
$reason = base64_encode($dd['reason']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment