Example #1
0
File: rss.php Project: poef/ariadne
 public static function client($url = null, $httpClient = null)
 {
     if (!isset($httpClient)) {
         $httpClient = ar_http::client();
     }
     return new ar_connect_rssClient($url, $httpClient);
 }
Example #2
0
function check_accept_path_info()
{
    if (function_exists('apache_lookup_uri')) {
        $extrapath = "/test_path_info/";
        $object = apache_lookup_uri($_SERVER['REQUEST_URI'] . $extrapath);
        if ($object->path_info == $extrapath) {
            return true;
        }
        return false;
    } else {
        $ariadne = '';
        @(include "../ariadne.inc");
        if ($ariadne != '') {
            require_once $ariadne . '/ar.php';
            // checking if path_info could be available
            $testuri = new ar_url('http://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
            $testuri->query = '';
            $testuri->path = str_replace('/index.php', '/', $testuri->path) . "serverinfo.php";
            $testuri = (string) $testuri;
            $result1 = json_decode(ar_http::get($testuri), true);
            $result2 = json_decode(ar_http::get($testuri . '/my/path/info'), true);
            if (is_array($result1) && is_array($result2)) {
                // self request works
                // pathinfo could work
                if ($result2['server']['PATH_INFO'] == '/my/path/info') {
                    return true;
                } else {
                    return false;
                }
            } elseif (is_array($result1) && is_null($result2)) {
                // self request works
                // request with pathinfo fails
                return false;
            } else {
                // self request fails
                // should return 'check via browser'
                return false;
            }
        }
    }
    return false;
}
Example #3
0
 public static function configure($option, $value)
 {
     switch ($option) {
         case 'tainting':
             self::$tainting = $value;
             break;
     }
 }
Example #4
0
 public function getvar($name = null, $method = null)
 {
     return ar_http::getvar($name, $method);
 }