Beispiel #1
0
function myspecialgrokkerI(&$output, $url)
{
    global $bypassproxy, $myurlnameEnc, $_SERVER;
    $BIGNUMBER = 10000000;
    $fileurl = "";
    if (preg_match("/www\\.youtube\\.com\\/watch\\?v=/ims", $url) && ($fileurl = getYoutubeUrl($output)) !== NULL) {
        //error_log("FURL: $fileurl");
        $fileurl = "{$bypassproxy}?{$myurlnameEnc}=" . grokReplace($fileurl, $fileurl, 1);
        if (($start = stripos($output, "<div id=\"watch-player-div\"", 0)) !== FALSE || ($start = stripos($output, "<div id=\"watch-player\"", 0)) !== FALSE) {
            $embed = <<<EMBED
\t\t<div id="watch-player-divx" class="flash-player"><embed 
\t\tsrc="{player}"
        width="620"
        height="380"
        bgcolor="000000"
        allowscriptaccess="always"
        allowfullscreen="true"
        type="application/x-shockwave-flash"
        pluginspage="http://www.macromedia.com/go/getflashplayer" \t
EMBED;
            $embed = preg_replace("/\\{player\\}/ims", preg_replace("/(.*\\/).*/ims", "\\1player-viral.swf", $bypassproxy), $embed);
            $fileurl = urlencode($fileurl);
            $embed .= "\nflashvars=\"width=620&amp;height=380&amp;type=video&amp;fullscreen=true&amp;volume=100&amp;autostart=true&amp;file={$fileurl}\" /></div>";
            $more = 1;
            $searchp = $start;
            while ($more > 0) {
                if (($dcl = stripos($output, "</div>", $searchp + 1)) === FALSE) {
                    $dcl = $BIGNUMBER;
                }
                if (($dop = stripos($output, "<div", $searchp + 1)) === FALSE) {
                    $dop = $BIGNUMBER;
                }
                if ($dop < $dcl) {
                    $searchp = $dop;
                    $more++;
                } else {
                    $searchp = $dcl;
                    $more--;
                }
            }
            $end = $searchp + 6;
            //$end=stripos($output,"</div>", stripos($output,"</div>", $start)+6);
            $x = substr($output, 0, $start);
            $x .= $embed;
            $x .= substr($output, $end);
            $output = $x;
        }
    }
    return true;
}
Beispiel #2
0
function grokLocation($header, $raw = 0)
{
    if (preg_match("/location:\\s(.*?)\\r\\n/is", $header, $matches)) {
        $loc = $matches[1];
        if (stripos("http", $loc) == 0) {
            //do nothing
        } else {
            if (stripos("/", $loc) == 0) {
                $loc = "{$currentHost}{$loc}";
            } else {
                $loc = "{$currentDirectory}/{$loc}";
            }
        }
        if ($raw == 0) {
            return grokReplace($matches[1], $matches[1]);
        } else {
            return $matches[1];
        }
    } else {
        return NULL;
    }
}
Beispiel #3
0
        makeDataarray($_GET, $dataarray);
    } else {
        if (isset($_GET[URLNAMEPLAIN])) {
            if (!$securityok) {
                header(makeAllHTTPS("Location: {$mysecurityhtml}/html_security.php?" . $_SERVER["QUERY_STRING"]));
                exit(0);
            }
            $original_req_url = $_GET[URLNAMEPLAIN];
            $sub_req_url = $original_req_url;
            makeDataarray($_GET, $dataarray);
        } else {
            $sub_req_url = decodebaseRequest($_SERVER['REQUEST_URI']);
            if ($sub_req_url === NULL) {
                if (preg_match("/" . chost_cookie . "=([^;]*)/is", $_SERVER['HTTP_COOKIE'], $matches)) {
                    $newurl = $matches[1] . $_SERVER['REQUEST_URI'];
                    header(makeAllHTTPS("Location: " . grokReplace($newurl, $newurl)));
                    exit(0);
                } else {
                    header(makeAllHTTPS("Location: {$myerrorpage}?e=1"));
                    exit(0);
                }
            }
        }
    }
}
if (!isset($sub_req_url) || $sub_req_url == "") {
    header(makeAllHTTPS("Location: {$myerrorpage}?e=2"));
    exit(0);
} else {
    $newhost = getRedirectProxy($sub_req_url);
    if ($newhost != NULL) {