コード例 #1
0
ファイル: function.php プロジェクト: egozza/SVGmaps
function CreateValue($NameValue, $Type)
{
    request_url();
    switch ($Type) {
        case 'Var':
            return strip_tags($_REQUEST[$NameValue]);
            break;
        case 'Array':
            return json_decode(trim(file_get_contents('php://input')), true);
            break;
        default:
            return strip_tags($_REQUEST[$NameValue]);
            break;
    }
}
コード例 #2
0
    <?php 
/*
    Template Name: landing_tpl
*/
$href = request_url();
$arr = parse_url($href);
$action_alias = preg_replace('/^\\//', '', $arr['path']);
$action_alias = preg_replace('/(^\\w+)\\/.*/', '$1', $action_alias);
$theme_path = 'http://mirbileta.ru/wp-content/themes/mirbileta_done/';
$global_prot = 'https';
$global_url = 'shop.mirbileta.ru';
$global_salesite = 'mirbileta.ru';
//    $url = $global_prot . "://" . $global_url . "/cgi-bin/site?request=<command>get_actions</command><url>".$global_salesite."</url><action_url_alias>".$action_alias."</action_url_alias>";
//
//    $ch = curl_init();
//
//    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
//    curl_setopt($ch, CURLOPT_URL, $url);
//    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//    curl_setopt($ch, CURLOPT_TIMEOUT, 15);
//    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
//
//    $resp = curl_exec($ch);
//
//    if (curl_errno($ch))
//        print curl_error($ch);
//    else
//        curl_close($ch);
//    $columns = json_decode($resp)->results["0"]->data_columns;
//    $data = json_decode($resp)->results["0"]->data[0];
//
コード例 #3
0
ファイル: common.fun.php プロジェクト: winiceo/job
function write_syslog($type, $type_name, $str)
{
    global $db, $online_ip, $ip_address;
    $setarr["l_type"] = $type;
    $setarr["l_type_name"] = $type_name;
    $setarr["l_time"] = time();
    $setarr["l_ip"] = $online_ip;
    $setarr["l_address"] = $ip_address;
    $setarr["l_page"] = request_url();
    $setarr["l_str"] = $str;
    return $db->inserttable(table("syslog"), $setarr);
}
コード例 #4
0
<?php

/**
 * Created by PhpStorm.
 * User: goptarev
 * Date: 22.01.16
 * Time: 19:10
 */
$href_h = request_url();
$arr_h = parse_url($href_h);
$query_h = $arr_h['query'];
$sid = $_COOKIE["site_sid"];
require_once 'wp-content/plugins/SocialAuther-master/lib/SocialAuther/autoload.php';
?>















<div class="mbw-loader-holder">
    <div class="mbw-loader-gif"></div>
コード例 #5
0
ファイル: details.php プロジェクト: beholder17/ls.files
    // А порт у нас по-умолчанию?
    if ($_SERVER['SERVER_PORT'] != $default_port) {
        // Если нет, то добавим порт в URL
        $result .= ':' . $_SERVER['SERVER_PORT'];
    }
    // Последняя часть запроса (путь и GET-параметры).
    $result .= $_SERVER['REQUEST_URI'];
    // Уфф, вроде получилось!
    return $result;
}
$summer_txt = "%D0%92%D0%B5%D1%81%D0%BD%D0%B0-%D0%BB%D0%B5%D1%82%D0%BE";
//Весна-лето
$winter_txt = "%D0%9E%D1%81%D0%B5%D0%BD%D1%8C-%D0%B7%D0%B8%D0%BC%D0%B0";
//Осень-зима
//"details.php?art=";
$foo = request_url();
if ($_GET['search_form_flag'] != "true") {
    if (strrpos($foo, 'art=', 0) != FALSE or strrpos($foo, 'cat=', 0) != FALSE or strrpos($foo, 'season=', 0) != FALSE or strrpos($foo, $summer_txt, 0) != FALSE or strrpos($foo, $winter_txt, 0) != FALSE) {
        //  echo "<script>alert('34');</script>";
        $tmp_s1 = season_translator($item_season);
        header("HTTP/1.1 301 Moved Permanently");
        if ($item_season == NULL) {
            $item_season = "any";
        }
        header("Location: http://www.ladystyle.su/im/details/{$tmp_s1}/{$cat_type}/{$title_words_content_num}");
        exit;
        //echo "<script>alert('mod-rewrite flag:  $item_season - $cat_type - $title_words_content_num');</script>";
    }
}
//получаем url страницы для определения его корректности (modrewrite), в противном случае - 301 редирект - конец
require_once $_SERVER['DOCUMENT_ROOT'] . '/template/header.php';
コード例 #6
0
ファイル: global.php プロジェクト: phpsource/openclerk
/**
 * Returns the current request path without any hostname or $_GET parameters.
 * Returns the current request URL along with $_GET parameters, relative to
 * {@code get_site_config('absolute_url')}.
 */
function request_url_relative()
{
    $url = str_replace("https://", "http://", request_url());
    if (strpos($url, "?") !== false) {
        $url = substr($url, 0, strpos($url, "?"));
    }
    $absolute = str_replace("https://", "http://", get_site_config('absolute_url'));
    $result = str_replace($absolute, "", $url);
    if (!$result) {
        $result = "index";
    }
    return $result;
}
コード例 #7
0
ファイル: help.class.php プロジェクト: winiceo/fenzhan
 static function CheckSql($db_string, $querytype = 'select')
 {
     global $QS_pwdhash;
     $clean = '';
     $error = '';
     $old_pos = 0;
     $pos = -1;
     $log_file = QISHI_ROOT_PATH . '/data/' . md5($QS_pwdhash) . '_safe.txt';
     $userIP = getip();
     $getUrl = request_url();
     $time = date('Y-m-d H:i:s');
     if ($querytype == 'select') {
         $notallow1 = "[^0-9a-z@\\._-]{1,}(sleep|benchmark|load_file|outfile)[^0-9a-z@\\.-]{1,}";
         if (preg_match("/" . $notallow1 . "/i", $db_string)) {
             fputs(fopen($log_file, 'a+'), "{$userIP}||{$time}\r\n{$getUrl}\r\n{$db_string}\r\nSelectBreak\r\n===========\r\n");
             exit("您输入的内容不符合要求请正确输入!");
         }
     }
     //完整的SQL检查
     while (TRUE) {
         $pos = strpos($db_string, '\'', $pos + 1);
         if ($pos === FALSE) {
             break;
         }
         $clean .= substr($db_string, $old_pos, $pos - $old_pos);
         while (TRUE) {
             $pos1 = strpos($db_string, '\'', $pos + 1);
             $pos2 = strpos($db_string, '\\', $pos + 1);
             if ($pos1 === FALSE) {
                 break;
             } elseif ($pos2 == FALSE || $pos2 > $pos1) {
                 $pos = $pos1;
                 break;
             }
             $pos = $pos2 + 1;
         }
         $clean .= '$s$';
         $old_pos = $pos + 1;
     }
     $clean .= substr($db_string, $old_pos);
     $clean = trim(strtolower(preg_replace(array('~\\s+~s'), array(' '), $clean)));
     if (strpos($clean, '@') !== FALSE or strpos($clean, 'char(') !== FALSE or strpos($clean, '"') !== FALSE or strpos($clean, '$s$$s$') !== FALSE) {
         $fail = TRUE;
         if (preg_match("#^create table#i", $clean)) {
             $fail = FALSE;
         }
         $error = "unusual character";
     } elseif (strpos($clean, '/*') > 2 || strpos($clean, '--') !== FALSE || strpos($clean, '#') !== FALSE) {
         $fail = TRUE;
         $error = "comment detect";
     } elseif (strpos($clean, 'sleep') !== FALSE && preg_match('~(^|[^a-z])sleep($|[^[a-z])~is', $clean) != 0) {
         $fail = TRUE;
         $error = "slown down detect";
     } elseif (strpos($clean, 'benchmark') !== FALSE && preg_match('~(^|[^a-z])benchmark($|[^[a-z])~is', $clean) != 0) {
         $fail = TRUE;
         $error = "slown down detect";
     } elseif (strpos($clean, 'load_file') !== FALSE && preg_match('~(^|[^a-z])load_file($|[^[a-z])~is', $clean) != 0) {
         $fail = TRUE;
         $error = "file fun detect";
     } elseif (strpos($clean, 'into outfile') !== FALSE && preg_match('~(^|[^a-z])into\\s+outfile($|[^[a-z])~is', $clean) != 0) {
         $fail = TRUE;
         $error = "file fun detect";
     }
     if (!empty($fail)) {
         fputs(fopen($log_file, 'a+'), "{$userIP}||{$time}\r\n{$getUrl}\r\n{$db_string}\r\n{$error}\r\n===========\r\n");
         exit("您输入的内容不符合要求请正确输入!");
     } else {
         return $db_string;
     }
 }
コード例 #8
0
ファイル: channel.php プロジェクト: 54oplang/fm-terminal
<?php

// Don't know on the fly how to request data from another URL in PHP, but it's easy to find out
$response = request_url("http://www.douban.com/j/app/radio/channels");
echo $_GET['callback'] . '(' . $response . ')';
コード例 #9
0
ファイル: cacher.php プロジェクト: idcooldi/modx_utils
}
// see http://www.webhostingtalk.com/showthread.php?t=1043707
// http://www.webdeveloper.com/forum/showthread.php?208676-Remote-site-loading-time
print "STARTING " . date('Y-m-d H:i:s') . "\n";
$mtime = explode(" ", microtime());
$tstart = $mtime[1] + $mtime[0];
$pg_cnt = 0;
$e_cnt = 0;
$collection = $modx->getIterator('modResource', $c);
foreach ($collection as $obj) {
    $url = $modx->makeUrl($obj->get('id'), '', '', 'full');
    if (!$url) {
        print 'ERROR empty URL for page ' . $obj->get('id') . "\n";
        continue;
    }
    if (!($loadtime = request_url($url))) {
        print 'ERROR requesting ' . $url . "\n";
        $e_cnt++;
    } else {
        print $url . ' Load Time: ' . $loadtime . "s\n";
        $pg_cnt++;
    }
    wait($params['sleep']);
}
$totalTime = $tend - $tstart;
$totalTime = sprintf("%2.4f s", $totalTime);
print "COMPLETE " . date('Y-m-d H:i:s') . "\n";
print "Total Time " . $totalTime . "s\n";
// seconds
print "Total pages: " . $pg_cnt . "\n";
print "Total errors: " . $e_cnt . "\n";
コード例 #10
0
ファイル: system.php プロジェクト: snenko/chechur
function getRequest()
{
    $current_url = request_url();
    return parse_url($current_url);
}
コード例 #11
0
ファイル: serverAngular.php プロジェクト: egozza/SVGmaps
 function SetArrayURL()
 {
     $this->ArrayURL = request_url();
 }
コード例 #12
0
ファイル: common.fun.php プロジェクト: dalinhuang/yy
function write_syslog($type, $type_name, $str)
{
    global $db, $online_ip, $ip_address;
    $l_page = addslashes(request_url());
    $str = addslashes($str);
    $sql = "INSERT INTO " . table('syslog') . " (l_type, l_type_name, l_time,l_ip,l_address,l_page,l_str) VALUES ('{$type}', '{$type_name}', '" . time() . "','{$online_ip}','{$ip_address}','{$l_page}','{$str}')";
    return $db->query($sql);
}