. */ /*********** Configuration ***********/ const APP_NAME = '🎭️ Proxatore'; const APP_DESCRIPTION = 'a content proxy for viewing and embedding media and text from various platforms.'; // if you make changes to the source code, please modify this to point to your modified version const SOURCE_CODE = 'https://hlb0.octt.eu.org/Drive/Misc/Scripts/Proxatore.php'; // cobalt API server URL; set to false or null or '' to avoid using cobalt const COBALT_API = 'http://192.168.1.125:9010/'; const OPTIONS_DEFAULTS = [ 'embedfirst' => false, 'history' => true, 'htmlmedia' => false, 'relativemedia' => false, 'mediaproxy' => false, 'viewmode' => 'normal', ]; const GOOGLE_VERIFICATION = 'HjNf-db8xb7lkRNgD3Q8-qeF1lWsbxmCZptRyjLBnrI'; const BING_VERIFICATION = '45DC0FC265FF4059D48677970BE86150'; define('USER_AGENT', "Proxatore/2025/1 ({$_SERVER['SERVER_NAME']})"); //define('USER_AGENT', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 Edg/136.0.0.0'); /*************************************/ //define('SCRIPT_NAME', $_SERVER['SCRIPT_NAME'] /* '/' */); define('SCRIPT_NAME', ($_SERVER['SCRIPT_NAME'] === '/' ? $_SERVER['SCRIPT_NAME'] : "{$_SERVER['SCRIPT_NAME']}/")); define('HISTORY_FILE', './Proxatore.history.jsonl'); // const OPTIONS_OVERRIDES = [ // 'bbs.spacc.eu.org' => [ // 'embedfirst' => true, // ], // ]; const PLATFORMS = [ 'spaccbbs' => ['bbs.spacc.eu.org'], 'bilibili' => ['bilibili.com'], 'bluesky' => ['bsky.app'], 'facebook' => ['facebook.com', 'm.facebook.com'], 'instagram' => ['instagram.com'], //'juxt' => ['juxt.pretendo.network'], 'raiplay' => ['raiplay.it'], 'reddit' => ['old.reddit.com', 'reddit.com'], 'spotify' => ['open.spotify.com'], 'telegram' => ['t.me', 'telegram.me'], 'threads' => ['threads.net', 'threads.com'], 'tiktok' => ['tiktok.com'], 'twitter' => ['twitter.com'], 'x' => ['x.com'], 'xiaohongshu' => ['xiaohongshu.com'], 'youtube' => ['youtube.com', 'm.youtube.com'], ]; const PLATFORMS_USERSITES = ['altervista.org', 'blogspot.com', 'wordpress.com']; const PLATFORMS_ALIASES = [ 'x' => 'twitter', ]; const PLATFORMS_PROXIES = [ 'bluesky' => ['fxbsky.app'], 'instagram' => ['ddinstagram.com', 'd.ddinstagram.com', 'kkinstagram.com'], 'threads' => ['vxthreads.net'], 'tiktok' => ['vxtiktok.com'], 'twitter' => ['fxtwitter.com', 'vxtwitter.com', 'fixvx.com'], 'x' => ['fixupx.com', 'girlcockx.com', 'stupidpenisx.com'], ]; const PLATFORMS_REDIRECTS = [ 'vm.tiktok.com' => 'tiktok', 'youtu.be' => 'youtube', ]; const PLATFORMS_API = [ 'spotify' => [ 'id' => '__NEXT_DATA__', 'data' => [ 'audio' => "['props']['pageProps']['state']['data']['entity']['audioPreview']['url']", ], ], 'tiktok' => [ 'url' => 'https://www.tiktok.com/player/api/v1/items?item_ids=', 'data' => [ 'description' => "['items'][0]['desc']", 'video' => "['items'][0]['video_info']['url_list'][0]", ], ], ]; const PLATFORMS_COBALT = ['instagram', 'bilibili']; const PLATFORMS_FAKE404 = ['telegram']; const PLATFORMS_HACKS = ['bluesky', 'threads', 'twitter', 'x']; const PLATFORMS_ORDERED = ['telegram']; // const PLATFORMS_VIDEO = ['youtube', 'bilibili']; // ['facebook', 'instagram']; const PLATFORMS_WEBVIDEO = ['raiplay']; const PLATFORMS_NOIMAGES = ['altervista.org', 'wordpress.com']; const PLATFORMS_PARAMS = [ 'facebook' => true, 'xiaohongshu' => true, 'youtube' => ['v'], ]; const EMBEDS = [ 'spotify' => ['open.spotify.com/embed/'], 'reddit' => ['embed.reddit.com'], ]; const EMBEDS_PREFIXES_SIMPLE = [ 'tiktok' => 'www.tiktok.com/embed/v3/', 'twitter' => 'platform.twitter.com/embed/Tweet.html?id=', ]; const EMBEDS_PREFIXES_PARAMS = [ 'youtube' => 'www.youtube.com/embed/[v]', ]; const EMBEDS_SUFFIXES = [ 'instagram' => '/embed/captioned/', 'telegram' => '?embed=1&mode=tme', ]; define('EMBEDS_PREFIXES_FULL', [ 'facebook' => 'www.facebook.com/plugins/post.php?href=' . urlencode('https://www.facebook.com/'), ]); function normalizePlatform(string $platform): string { if (str_contains($platform, '.')) { $platform = lstrip($platform, '.', -2); //implode('.', array_slice(explode('.', $platform), -2)); } return $platform; } function inPlatformArray(string $platform, array $array): bool { return in_array(normalizePlatform($platform), $array); } function platformMapGet(string $platform, array $array): mixed { return $array[normalizePlatform($platform)] ?? null; } function lstrip(string $str, string $sub, int $num): string { return implode($sub, array_slice(explode($sub, $str), $num)); } function urlLast(string $url): string { return end(explode('/', trim(parse_url($url, PHP_URL_PATH), '/'))); } function parseAbsoluteUrl(string $str) { $strlow = strtolower($str); if (str_starts_with($strlow, 'http://') || str_starts_with($strlow, 'https://')) { return lstrip($str, '://', 1); //implode('://', array_slice(explode('://', $str), 1)); } } function makeSelfUrl(string $str=''): string { return $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['SERVER_NAME'] . SCRIPT_NAME . $str; } function redirectTo($url): void { if (!($absolute = parseAbsoluteUrl($url)) && !readProxatoreBool('history') /* && !(str_contains($url, '?proxatore-history=false') || str_contains($url, '&proxatore-history=false')) */) { parse_str(parse_url($url, PHP_URL_QUERY), $params); if (!isset($params['proxatore-history'])) { $url = $url . (str_contains($url, '?') ? '&' : '?') . 'proxatore-history=false'; } } // if ($_SERVER['REQUEST_METHOD'] === 'GET' || $absolute) { header('Location: ' . ($absolute ? '' : SCRIPT_NAME) . $url); // } else if ($_SERVER['REQUEST_METHOD'] === 'POST') { // echo postRequest(SCRIPT_NAME, 'proxatore-url=' . str_replace('?', '&', $url)); // } die(); } function fetchContent(string $url, int $redirects=-1): array { $ch = curl_init(); //$useragent = 'Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0'; //$useragent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0'; $useragent = 'curl/' . curl_version()['version']; // format the UA like curl CLI otherwise some sites can't behave curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_MAXREDIRS, $redirects); curl_setopt($ch, CURLOPT_USERAGENT, $useragent); $data = [ 'body' => curl_exec($ch), 'code' => curl_getinfo($ch, CURLINFO_HTTP_CODE), 'url' => curl_getinfo($ch, CURLINFO_REDIRECT_URL) ?: curl_getinfo($ch, CURLINFO_EFFECTIVE_URL), // 'error' => curl_error($ch), ]; curl_close($ch); return $data; } function makeCanonicalUrl(array|null $item): string|null { return ($item ? ('https://' . (PLATFORMS[$item['platform']][0] ?: $item['platform']) . '/' . $item['relativeurl']) : null); } function makeEmbedUrl(string $platform, string $relativeUrl): string { $url = NULL; if (isset(EMBEDS_PREFIXES_SIMPLE[$platform])) { $url = EMBEDS_PREFIXES_SIMPLE[$platform] . urlLast($relativeUrl); } else if (isset(EMBEDS_PREFIXES_PARAMS[$platform])) { $url = EMBEDS_PREFIXES_PARAMS[$platform]; foreach (PLATFORMS_PARAMS[$platform] as $key) { parse_str(parse_url($relativeUrl, PHP_URL_QUERY), $params); $url = str_replace("[$key]", $params[$key], $url); } } else if (isset(EMBEDS_PREFIXES_FULL[$platform])) { $url = EMBEDS_PREFIXES_FULL[$platform] . urlencode($relativeUrl); } else { $url = (EMBEDS[$platform][0] ?? PLATFORMS[$platform][0] ?? PLATFORMS_PROXIES[$platform][0] ?? $platform) . '/' . trim($relativeUrl, '/') . (EMBEDS_SUFFIXES[$platform] ?? ''); } return "https://{$url}"; } function makeScrapeUrl(string $platform, string $relativeUrl): string { return 'https://' . ((inPlatformArray($platform, PLATFORMS_HACKS) ? (PLATFORMS_PROXIES[$platform][0] ?: PLATFORMS[$platform][0]) : PLATFORMS[$platform][0] ) ?: $platform) . '/' . $relativeUrl; } function getHtmlAttributes(DOMDocument|string $doc, string $tag, string $attr): array { if (is_string($doc)) { $doc = htmldom($doc); } $list = []; foreach ($doc->getElementsByTagName($tag) as $el) { $list[] = $el->getAttribute($attr); } return $list; } function parseMetaTags(DOMDocument $doc): array { $tags = []; foreach ($doc->getElementsByTagName('meta') as $meta) { if ($meta->hasAttribute('name') || $meta->hasAttribute('property')) { $tags[$meta->getAttribute('name') ?: $meta->getAttribute('property')] = $meta->getAttribute('content'); } } return $tags; } function loadHistory(): array { $history = []; if (file_exists(HISTORY_FILE)) { $lines = file(HISTORY_FILE, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); foreach ($lines as $line) { $history[] = json_decode($line, true); } } return $history; } function saveHistory(array $entry): void { if (inPlatformArray($entry['platform'], PLATFORMS_FAKE404)) { $history = searchExactHistory($entry['platform'], implode('/', array_slice(explode('/', $entry['relativeurl']), -1))); if (sizeof($history)) { unset($history[0]['relativeurl']); unset($entry['relativeurl']); if (json_encode($history[0], JSON_UNESCAPED_SLASHES) === json_encode($entry, JSON_UNESCAPED_SLASHES)) { return; } else { // TODO update cache of main page } } else { // TODO update cache of main page } } $history = loadHistory(); $history = array_filter($history, function ($item) use ($entry) { return (($item['platform'] !== $entry['platform']) || ($item['relativeurl'] !== $entry['relativeurl'])); }); $history[] = $entry; $lines = array_map(fn($item) => json_encode($item, JSON_UNESCAPED_SLASHES), $history); file_put_contents(HISTORY_FILE, implode(PHP_EOL, $lines) . PHP_EOL, LOCK_EX); } function searchHistory(string $query): array { $results = []; $fake404 = []; foreach (loadHistory() as $entry) { if (stripos(json_encode($entry, JSON_UNESCAPED_SLASHES), $query) !== false) { if (inPlatformArray($entry['platform'], PLATFORMS_FAKE404)) { $entry2 = $entry; unset($entry2['relativeurl']); foreach ($fake404 as $item) { if (json_encode($entry2, JSON_UNESCAPED_SLASHES) === json_encode($item, JSON_UNESCAPED_SLASHES)) { goto skip; } } $fake404[] = $entry2; } $results[] = $entry; skip: } } return $results; } function searchExactHistory(string $platform, string $relativeUrl): array { return searchHistory(json_encode([ 'platform' => $platform, 'relativeurl' => $relativeUrl, ], JSON_UNESCAPED_SLASHES)); } function htmldom(string $body): DOMDocument { libxml_use_internal_errors(true); $doc = new DOMDocument(); $doc->loadHTML(mb_convert_encoding($body, 'HTML-ENTITIES', 'UTF-8')); libxml_clear_errors(); return $doc; } function getAnyVideoUrl(string $txt) { if ($vidpos = (strpos($txt, '.mp4?') ?? strpos($txt, '.mp4'))) { $endpos = strpos($txt, '"', $vidpos); $vidstr = substr($txt, 0, $endpos); $startpos = $endpos - strpos(strrev($vidstr), '"'); $vidstr = substr($txt, $startpos, $endpos-$startpos+1); $vidstr = html_entity_decode($vidstr); $vidstr = json_decode('"' . json_decode('"' . $vidstr . '"')) ?: json_decode('"' . json_decode('"' . $vidstr) . '"'); return $vidstr; } } function makeResultObject(string $platform, string $relativeUrl, array $metaTags): array { $data = [ 'platform' => $platform, 'relativeurl' => $relativeUrl, //'datetime' => date('Y-m-d H:i:s'), //'request_time' => time(), 'locale' => $metaTags['og:locale'] ?? '', 'type' => $metaTags['og:type'] ?? '', 'image' => $metaTags['og:image'] ?? '', 'video' => $metaTags['og:video'] ?? $metaTags['og:video:url'] ?? '', 'videotype' => $metaTags['og:video:type'] ?? '', 'htmlvideo' => $metaTags['og:video'] ?? $metaTags['og:video:url'] ?? '', 'audio' => $metaTags['og:audio'] ?? '', 'title' => $metaTags['og:title'] ?? $metaTags['og:title'] ?? '', //'author' => $metaTags['og:site_name'] ?? '', 'description' => $metaTags['og:description'] ?? $metaTags['description'] ?? '', 'images' => [], ]; if (inPlatformArray($platform, PLATFORMS_WEBVIDEO) && !$data['video']) { $data['video'] = makeCanonicalUrl($data); $data['videotype'] = 'text/html'; } if ($data['video'] && $data['videotype'] === 'text/html') { $proxy = ((inPlatformArray($platform, PLATFORMS_WEBVIDEO) || readProxatoreBool('mediaproxy') || getQueryArray()['proxatore-mediaproxy'] === 'video') ? 'file' : ''); $data['htmlvideo'] = SCRIPT_NAME . "__{$proxy}proxy__/{$platform}/{$data['video']}"; if (readProxatoreBool('htmlmedia')) { $data['video'] = $data['htmlvideo']; $data['videotype'] = 'video/mp4'; } } // } else if (readProxatoreBool('mediaproxy') || getQueryArray()['proxatore-mediaproxy'] === 'video') { // $data['htmlvideo'] = SCRIPT_NAME . "__mediaproxy__/{$platform}/{$data['video']}"; // if (readProxatoreBool('htmlmedia')) { // $data['video'] = $data['htmlvideo']; // $data['videotype'] = 'video/mp4'; // } // } return $data; } function makeParamsRelativeUrl(string $platform, string $url): string { parse_str(parse_url($url, PHP_URL_QUERY), $params); $url = parse_url($url, PHP_URL_PATH) . '?'; foreach ($params as $key => $value) { if (in_array($key, PLATFORMS_PARAMS[$platform])) { $url .= "{$key}={$value}&"; } } return rtrim($url, '?&'); } function getQueryArray(): array { // switch ($_SERVER['REQUEST_METHOD']) { // case 'GET': return $_GET; // case 'POST': // return $_POST; // } } function readBoolParam(string $key, bool|null $default=null, array $array=null) { if (!$array) { $array = getQueryArray(); } $value = $array[$key] ?? null; if ($value && $value !== '') { return filter_var($value, FILTER_VALIDATE_BOOLEAN); } else { return $default; } } function readProxatoreBool(string $key, array $array=null) { return readBoolParam("proxatore-{$key}", OPTIONS_DEFAULTS[$key], $array); // TODO handle domain HTTP referer overrides } function readProxatoreParam(string $key, array $array=null) { if (!$array) { $array = getQueryArray(); } return ($array["proxatore-{$key}"] ?? OPTIONS_DEFAULTS[$key] ?? null); } function getPageData($platform, $relativeUrl) { if ($platform && $relativeUrl && ($data = fetchContent(makeScrapeUrl($platform, $relativeUrl)))['body']) { // if (!in_array($platform, PLATFORMS_TRACKING)) { // $relativeUrl = parse_url($relativeUrl, PHP_URL_PATH); // } if (isset(PLATFORMS_PARAMS[$platform])) { if (PLATFORMS_PARAMS[$platform] !== true) { $relativeUrl = makeParamsRelativeUrl($platform, $relativeUrl); } } else { $relativeUrl = parse_url($relativeUrl, PHP_URL_PATH); } $query = parse_url($data['url'], PHP_URL_QUERY); //$relativeUrl = substr((parse_url($data['url'], PHP_URL_PATH) . ($query ? "?{$query}" : '')), 1); $data['doc'] = htmldom($data['body']); $data['result'] = makeResultObject($platform, $relativeUrl, parseMetaTags($data['doc'])); return $data; } } function postRequest(string $url, string $body, array $headers=null): string|false { return file_get_contents($url, false, stream_context_create(['http' => [ 'header' => $headers, 'method' => 'POST', 'content' => $body, ]])); } function getCobaltVideo(string $url) { $cobaltData = json_decode(postRequest(COBALT_API, json_encode(['url' => $url]), [ 'Accept: application/json', 'Content-Type: application/json', ])); if ($cobaltData->status === 'redirect' && strpos($cobaltData->url, '.mp4')) { return $cobaltData->url; } else if ($cobaltData->status === 'tunnel' && strpos($cobaltData->filename, '.mp4')) { return SCRIPT_NAME . '__cobaltproxy__/_/' . lstrip($cobaltData->url, '/', 3); } } function fetchPageMedia(string $url, array &$result): void { $platform = $result['platform']; $relativeUrl = $result['relativeurl']; //if ((in_array($platform, PLATFORMS_VIDEO) && !$immediateResult['video']) || !$immediateResult['image']) { if ($api = platformMapGet($platform, PLATFORMS_API)) { $json = null; if (isset($api['url'])) { $json = fetchContent($api['url'] . urlLast($relativeUrl))['body']; } else if (isset($api['id'])) { $doc = htmldom(fetchContent(makeEmbedUrl($platform, $relativeUrl))['body']); $json = $doc->getElementById($api['id'])->textContent; } $data = json_decode($json, true); $values = []; foreach ($api['data'] as $key => $query) { $values[$key] = eval("return \$data{$query};"); } $result = array_merge($result, $values); } else { $cobaltVideo = null; if (COBALT_API && inPlatformArray($platform, PLATFORMS_COBALT)) { $cobaltVideo = getCobaltVideo($url); } $html = fetchContent(makeEmbedUrl($platform, $relativeUrl))['body']; if (!$result['video']) { $result['video'] = $cobaltVideo ?? getAnyVideoUrl($html) ?? ''; } if (!inPlatformArray($platform, PLATFORMS_NOIMAGES) /* !$immediateResult['image'] */) { $result['images'] = getHtmlAttributes($html, 'img', 'src'); // if (sizeof($immediateResult['images'])) { // //$immediateResult['image'] = $imgs[0]; // } } } } function getWebStreamUrls(string $absoluteUrl, string $options='') { if (($url = parseAbsoluteUrl($absoluteUrl)) && ($url = preg_replace('/[^A-Za-z0-9-_\/\.]/', '', $url))) { return explode("\n", trim(shell_exec("yt-dlp {$options} -g 'https://{$url}'"))); } } function getYoutubeStreamUrl(string $relativeUrl): string { if ($video = preg_replace('/[^A-Za-z0-9-_]/', '', substr($relativeUrl, -11))) { return getWebStreamUrls("https://youtu.be/{$video}", '-f mp4')[0]; //trim(shell_exec("yt-dlp -g 'https://youtube.com/watch?v={$video}'")); } } function ffmpegStream(string $absoluteUrl): void { if ($urls = getWebStreamUrls($absoluteUrl, '--user-agent "' . USER_AGENT . '"')) { $inputs = ''; foreach ($urls as $url) { $inputs .= " -i '{$url}' "; } header('Content-Type: video/mp4'); passthru("ffmpeg -user_agent '" . USER_AGENT . "' {$inputs} -c:v copy -f ismv -"); } die(); } // function ytdlpStream(string $absoluteUrl): void { // if (($url = parseAbsoluteUrl($absoluteUrl)) && ($url = preg_replace('/[^A-Za-z0-9-_\/\.]/', '', $url))) { // header('Content-Type: video/mp4'); // passthru("yt-dlp -f mp4 -o - 'https://{$url}' | ffmpeg -i - -c:v copy -f ismv -"); // } // die(); // } // TODO: redesign the endpoint names, they're kind of a mess function handleApiRequest(array $segments): void { $api = substr($segments[0], 2, -2); $platform = $segments[1]; $relativeUrl = implode('/', array_slice($segments, 2)); if (($api === 'proxy' || $api === 'media')) { if ($platform === 'youtube') { header('Location: ' . getYoutubeStreamUrl($relativeUrl)); } else if ($api === 'media' && end($segments) === '0') { $relativeUrl = substr($relativeUrl, 0, -2); $data = getPageData($platform, $relativeUrl)['result']; if ($url = ($data['video'] ?: $data['image'])) { header('Location: ' . $url); } } } else if ($api === 'fileproxy') { switch ($platform) { case 'youtube': header('Content-Type: video/mp4'); readfile(getYoutubeStreamUrl($relativeUrl)); break; default: ffmpegStream('https://' . PLATFORMS[$platform][0] . '/' . lstrip($relativeUrl, '/', 3)); } } else if ($api === 'cobaltproxy') { header('Content-Type: video/mp4'); readfile(COBALT_API . $relativeUrl); } else if ($api === 'embed') { header('Location: ' . makeEmbedUrl($platform, $relativeUrl)); } die(); } function linkifyUrls(string $text): string { return preg_replace('/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/', '$0', $text); } function iframeHtml($result): void { ?>
$domains) { if (in_array($upstream, $domains) || in_array(lstrip($upstream, 'www.', 1), $domains)) { return redirectTo($platform . '/' . $relativeUrl); } } //unset($platform); $platform = null; } } if (!$platform && isset(PLATFORMS_REDIRECTS[$upstream])) { // // TODO: only strip query params for platforms that don't need them //$relativeUrl = trim(parse_url(fetchContent("{$upstream}/{$relativeUrl}", 1)['url'], PHP_URL_PATH), '/'); $relativeUrl = trim(lstrip(fetchContent("{$upstream}/{$relativeUrl}", 1)['url'], '/', 3), '/'); $platform = PLATFORMS_REDIRECTS[$upstream]; return redirectTo("{$platform}/{$relativeUrl}"); } else if (!$platform) { foreach (PLATFORMS_USERSITES as $domain) { if (str_ends_with($upstream, ".{$domain}")) { $platform = $upstream; break; } } } //if ($relativeUrl && $platform && ($content = fetchContent(makeScrapeUrl($platform, $relativeUrl)))['body']) { if ($data = getPageData($platform, $relativeUrl)) { http_response_code($data['code']); $immediateResult = $data['result']; //if ($immediateResult['video'] && $immediateResult['videotype'] === 'text/html' && readProxatoreBool('htmlmedia')) { // $proxy = ((readProxatoreBool('mediaproxy') || getQueryArray()['proxatore-mediaproxy'] === 'video') ? 'file' : ''); // $immediateResult['video'] = SCRIPT_NAME . "__{$proxy}proxy__/{$platform}/{$immediateResult['video']}"; // $immediateResult['videotype'] = 'video/mp4'; //} fetchPageMedia($data['url'], $immediateResult); //} //if ($immediateResult['title'] || $immediateResult['description']) { // saveHistory($immediateResult); //} else if ($data['code'] >= 400) { $searchResults = searchExactHistory($platform, $immediateResult['relativeurl']); if (sizeof($searchResults)) { $immediateResult = $searchResults[0]; } } else if (readProxatoreBool('history')) { saveHistory($immediateResult); } $immediateResult['description'] = linkifyUrls($immediateResult['description']); if (readProxatoreBool('relativemedia')) { $count = 0; foreach (['video', 'image'] as $type) { if ($immediateResult[$type]) { $immediateResult[$type] = SCRIPT_NAME . "__media__/{$platform}/{$immediateResult['relativeurl']}/{$count}"; $count++; } } } $searchResults = [$immediateResult]; } else if ($path) { http_response_code(404); } } ?>proxatore-search=
{search term} — Make a full-text search or load a given URLproxatore-history=
{true,false} — Specify if a given query must be stored in the global search history (default: true)
'.APP_NAME.' is '.APP_DESCRIPTION.'
It allows you to bypass ratelimits and georestrictions when accessing contents from many specific Internet platforms,
and to view them with a clean and streamlined interface, that works well on both modern systems and old browsers or slow connections.
Additionally, it allows you to share links between social media platforms, ensuring link previews, which are often blocked by competitors, always display correctly.
This software is free and open-source, and you can host it on your own server, for either private or public use.
curl
and mbstring
PHP extensionsMade with 🕸️ and 🧨 by OctoSpacc.
Licensed under AGPLv3. Source Code: Proxatore.php.
Nothing was found.
= htmlspecialchars($item['title']) ?> = htmlspecialchars($item['platform']) ?>
= htmlspecialchars($item['title']) ?> = htmlspecialchars($item['platform']) ?>
= /*htmlspecialchars*/($item['description']) ?>
Original on = htmlspecialchars(PLATFORMS[$item['platform']][0] ?: $item['platform']) ?>/= htmlspecialchars($item['relativeurl']) ?>
>
= readProxatoreParam('viewmode') === 'embed' ? ('Powered by ' . APP_NAME) : (APP_NAME . ' Permalink') ?>