Вход Регистрация
Файл: sys/inc/api_config.php
Строк: 42
<?

//Контанты для работы api скриптов

define('API_update_files''http://api.dcms-fiera.ru/api/api_files/install_update/');
define('FIERA_URL''http://dcms-fiera.ru');
define('FIERA_URL_API''http://api.dcms-fiera.ru');
#    константа новостей

define('FIERA_API_NEWS''http://api.dcms-fiera.ru/api_files/api_1/news_api.php');
define('FIERA_API_NEWS_US''http://api.dcms-fiera.ru/api_files/api_1/news_us.php');
define('FIERA_API_update''http://api.dcms-fiera.ru/api_files/api_1/update.php');
define('API_SUPPORT_URL''http://api.dcms-fiera.ru/api_files/api_1/support.php');
define('API_SUPPORT_URL_I''http://api.dcms-fiera.ru/api_files/api_1/support.php');
define('API_SUPPORT_URL_LICENSE''http://api.dcms-fiera.ru/api_files/api_1/license.php');
define('TODAY_STAT_FIERA''http://api.dcms-fiera.ru/api_files/api_1/today.php');


//проверяем доступность сайта 
function check_http_status($url)
  {
  
$user_agent 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)';
  
$ch curl_init();
  
curl_setopt($chCURLOPT_URL$url);
  
curl_setopt($chCURLOPT_USERAGENT$user_agent);
  
curl_setopt($chCURLOPT_RETURNTRANSFER1);
  
curl_setopt($chCURLOPT_VERBOSEfalse);
  
curl_setopt($chCURLOPT_TIMEOUT10);
  
curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
  
curl_setopt($chCURLOPT_SSLVERSION3);
  
curl_setopt($chCURLOPT_SSL_VERIFYHOSTfalse);
  
$page curl_exec($ch);

  
$err curl_error($ch);
  if (!empty(
$err))return null;
  
  
$httpcode curl_getinfo($chCURLINFO_HTTP_CODE);
  
curl_close($ch);
  return 
$httpcode;
 }

 
 
 
//потом удалю
 
class api_fnc{

    function 
time_key($time 0)
    {
        return 
$time;
    }
    
    function 
output($text null)
    {
        return 
$text;
    }
    
    function 
err($text null)
    {
    
        
$text "<div class='license_err'>{$text}</div>";
        return 
$text;
    }
    }
 
     function 
time_key($time 0)
    {
        return 
vremja_last($time time());
    }
Онлайн: 2
Реклама