Файл: _modules/admin/platforms/check/index.php
Строк: 13
<?php
# mark core v1.0
# author Drk in
# date 24.10.19
# core
require_once ( $_SERVER['DOCUMENT_ROOT']."/_core/system.php" );
# adm
system::adm();
$id = isset( $_GET['id'] ) ? system::abs($_GET['id']): 0;
if (cache_pf::ch($id) === false)system::header('/admin/platforms','Ошибка, ID не найден');
$act = cache_pf::check($id);
$get = @file_get_contents('http://'.$act['url']);
@preg_match('#<a href="htt(.*)://'.domain.'/in/(.*)"><img src="htt(.*)://'.domain.'/cn/(.*)/(.*)"></a>#sU', $get, $cn);
$ch = (!empty($cn) ? 0:1);
DB :: $dbh -> query("UPDATE platforms SET ch = ? WHERE id = ? LIMIT 1;", array($ch,$id));
cache_pf::save($id);
system::header('/admin/platforms','Успешно проверен',1,1);
?>