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

//Контанты для работы 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($ch, CURLOPT_URL, $url);
    
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
    
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    
curl_setopt($ch, CURLOPT_VERBOSE, false);
    
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
    
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    
curl_setopt($ch, CURLOPT_SSLVERSION, 3);
    
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    
$page = curl_exec($ch);

    
$err = curl_error($ch);
    if (!empty(
$err)) {
        return 
null;
    }
  
    
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    
curl_close($ch);
    return 
$httpcode;
}

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