mirror of
https://gitlab.com/octospacc/Proxatore.git
synced 2025-06-05 17:19:18 +02:00
v0.2, 14/01
This commit is contained in:
378
Proxatore.php
378
Proxatore.php
@@ -1,33 +1,59 @@
|
|||||||
<?php
|
<?php
|
||||||
|
const APPNAME = 'Proxatore';
|
||||||
|
|
||||||
|
const PLATFORMS = [
|
||||||
|
'facebook' => ['facebook.com', 'm.facebook.com'],
|
||||||
|
'instagram' => ['instagram.com', 'ddinstagram.com', 'd.ddinstagram.com'],
|
||||||
|
'reddit' => ['old.reddit.com', 'reddit.com'],
|
||||||
|
'telegram' => ['t.me', 'telegram.me'],
|
||||||
|
'tiktok' => ['tiktok.com', 'vxtiktok.com'],
|
||||||
|
'twitter' => ['twitter.com', 'fxtwitter.com', 'vxtwitter.com'],
|
||||||
|
'x' => ['x.com', 'fixupx.com'],
|
||||||
|
//'wordpress' => ['wordpress.com'],
|
||||||
|
];
|
||||||
|
|
||||||
|
const EMBEDS = [
|
||||||
|
'reddit' => ['embed.reddit.com'],
|
||||||
|
];
|
||||||
|
|
||||||
|
const EMBEDS_SUFFIXES = [
|
||||||
|
'instagram' => '/embed/captioned/',
|
||||||
|
'telegram' => '?embed=1&mode=tme',
|
||||||
|
];
|
||||||
|
|
||||||
define('HISTORY_FILE', './' . $_SERVER['SCRIPT_NAME'] . '.history.jsonl');
|
define('HISTORY_FILE', './' . $_SERVER['SCRIPT_NAME'] . '.history.jsonl');
|
||||||
|
|
||||||
$platforms = [
|
function lstrip($str, $sub) {
|
||||||
'telegram' => ['t.me', 'telegram.me'],
|
return implode($sub, array_slice(explode($sub, $str), 1));
|
||||||
'reddit' => ['reddit.com', 'old.reddit.com'],
|
}
|
||||||
'instagram' => ['instagram.com'],
|
|
||||||
'facebook' => ['facebook.com'],
|
|
||||||
'tiktok' => ['tiktok.com'],
|
|
||||||
'twitter' => ['twitter.com'],
|
|
||||||
'x' => ['x.com'],
|
|
||||||
];
|
|
||||||
|
|
||||||
function fetchContent($url) {
|
function fetchContent($url) {
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
|
//$useragent = 'Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0';
|
||||||
|
$useragent = 'curl/' . curl_version()['version'];
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Content Proxy)');
|
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
||||||
$html = curl_exec($ch);
|
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
|
||||||
|
$body = curl_exec($ch);
|
||||||
|
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||||
|
http_response_code();
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
return $html ?: null;
|
return [
|
||||||
|
'body' => $body,
|
||||||
|
'code' => $code,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseMetaTags($html) {
|
function makeEmbedUrl($platform, $relativeUrl) {
|
||||||
$doc = new DOMDocument();
|
return 'https://' . (EMBEDS[$platform][0] ?: PLATFORMS[$platform][0] ?: '') . '/' . $relativeUrl . (EMBEDS_SUFFIXES[$platform] ?? '');
|
||||||
@$doc->loadHTML($html);
|
}
|
||||||
|
|
||||||
|
function parseMetaTags($doc) {
|
||||||
$metaTags = [];
|
$metaTags = [];
|
||||||
foreach ($doc->getElementsByTagName('meta') as $meta) {
|
foreach ($doc->getElementsByTagName('meta') as $meta) {
|
||||||
if ($meta->hasAttribute('property')) {
|
if ($meta->hasAttribute('name') || $meta->hasAttribute('property')) {
|
||||||
$metaTags[$meta->getAttribute('property')] = $meta->getAttribute('content');
|
$metaTags[$meta->getAttribute('name') ?: $meta->getAttribute('property')] = $meta->getAttribute('content');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $metaTags;
|
return $metaTags;
|
||||||
@@ -68,59 +94,94 @@ function searchHistory($keyword) {
|
|||||||
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
||||||
$immediateResult = null;
|
$immediateResult = null;
|
||||||
|
|
||||||
if (isset($_GET['search']) && $_GET['search'] !== '') {
|
if (isset($_GET['search']) && ($search = $_GET['search']) !== '') {
|
||||||
$searchResults = searchHistory($_GET['search']);
|
if (str_starts_with(strtolower($search), 'https://')) {
|
||||||
|
header('Location: ' . $_SERVER['SCRIPT_NAME'] . '/' . lstrip($search, 'https://'));
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
$searchResults = searchHistory($search);
|
||||||
} else {
|
} else {
|
||||||
$segments = explode('/', trim($path, '/'));
|
$segments = explode('/', trim($path, '/'));
|
||||||
array_shift($segments);
|
array_shift($segments);
|
||||||
|
|
||||||
|
$platform = null;
|
||||||
|
$upstreamUrl = null;
|
||||||
|
|
||||||
$upstream = $segments[0] ?? null;
|
$upstream = $segments[0] ?? null;
|
||||||
$relativeUrl = implode('/', array_slice($segments, 1));
|
$relativeUrl = implode('/', array_slice($segments, 1));
|
||||||
|
|
||||||
if (isset($platforms[$upstream])) {
|
if (isset(PLATFORMS[$upstream])) {
|
||||||
$platform = $upstream;
|
$platform = $upstream;
|
||||||
$domain = $platforms[$upstream][0];
|
$domain = PLATFORMS[$upstream][0];
|
||||||
$upstreamUrl = "https://$domain/$relativeUrl";
|
$upstreamUrl = "https://$domain";
|
||||||
} else {
|
} else {
|
||||||
foreach ($platforms as $platform => $domains) {
|
foreach ([PLATFORMS, EMBEDS] as $array) {
|
||||||
if (in_array($upstream, $domains) || in_array(implode('www.', array_slice(explode('www.', $upstream), 1)), $domains)) {
|
foreach ($array as $platform => $domains) {
|
||||||
$upstreamUrl = "https://$upstream/$relativeUrl";
|
if (in_array($upstream, $domains) || in_array(lstrip($upstream, 'www.'), $domains)) {
|
||||||
break;
|
header('Location: ' . $_SERVER['SCRIPT_NAME'] . '/' . $platform . '/' . $relativeUrl);
|
||||||
|
die();
|
||||||
|
//$upstreamUrl = "https://$upstream";
|
||||||
|
//break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($relativeUrl && ($html = fetchContent("$upstreamUrl/$relativeUrl"))) {
|
if ($relativeUrl && $upstreamUrl && ($content = fetchContent("$upstreamUrl/$relativeUrl"))['body']) {
|
||||||
$metaTags = parseMetaTags($html);
|
$doc = new DOMDocument();
|
||||||
|
$doc->loadHTML($content['body']);
|
||||||
|
$metaTags = parseMetaTags($doc);
|
||||||
$immediateResult = [
|
$immediateResult = [
|
||||||
'platform' => $platform,
|
'platform' => $platform,
|
||||||
'relativeurl' => $relativeUrl,
|
'relativeurl' => $relativeUrl,
|
||||||
'datetime' => date('Y-m-d H:i:s'),
|
//'datetime' => date('Y-m-d H:i:s'),
|
||||||
'request_time' => time(),
|
//'request_time' => time(),
|
||||||
'mediaurls' => [$metaTags['og:image'] ?? null],
|
'type' => $metaTags['og:type'] ?? '',
|
||||||
'title' => $metaTags['og:title'] ?? 'No title',
|
'image' => $metaTags['og:image'] ?? '',
|
||||||
'author' => $metaTags['og:site_name'] ?? 'Unknown',
|
'video' => $metaTags['og:video'] ?? '',
|
||||||
'description' => $metaTags['og:description'] ?? 'No description',
|
'title' => $metaTags['og:title'] ?? '',
|
||||||
|
'author' => $metaTags['og:site_name'] ?? '',
|
||||||
|
'description' => $metaTags['og:description'] ?: $metaTags['description'] ?: '',
|
||||||
];
|
];
|
||||||
|
if (!$immediateResult['video']) {
|
||||||
|
$html = fetchContent(makeEmbedUrl($platform, $relativeUrl))['body'];
|
||||||
|
$vidpos = strpos($html, '.mp4');
|
||||||
|
if ($vidpos) {
|
||||||
|
$startpos = strpos(substr(strrev($html), 0, $vidpos), '"');
|
||||||
|
$endpos = strpos(substr($html, $vidpos), '"');
|
||||||
|
echo $startpos . '|' . $endpos; //substr($html, $startpos, $endpos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$searchResults = [$immediateResult];
|
||||||
|
//if ($immediateResult['title'] || $immediateResult['description']) {
|
||||||
|
// saveHistory($immediateResult);
|
||||||
|
//} else
|
||||||
|
if ($content['code'] >= 400) {
|
||||||
|
$searchResults = searchHistory($relativeUrl);
|
||||||
|
$immediateResult = $searchResults[0];
|
||||||
|
} else {
|
||||||
saveHistory($immediateResult);
|
saveHistory($immediateResult);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
http_response_code(404);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Content Proxy</title>
|
<title><?php echo APPNAME; ?></title>
|
||||||
<meta name="description" content="<?= htmlspecialchars($immediateResult['description'] ?? 'Content Proxy for viewing media and text from various platforms.') ?>">
|
<meta name="description" content="<?= htmlspecialchars($immediateResult['description'] ?? 'Content Proxy for viewing media and text from various platforms.') ?>">
|
||||||
<meta property="og:title" content="<?= htmlspecialchars($immediateResult['title'] ?? 'Content Proxy') ?>">
|
<meta property="og:title" content="<?= htmlspecialchars($immediateResult['title'] ?? 'Content Proxy') ?>">
|
||||||
<meta property="og:description" content="<?= htmlspecialchars($immediateResult['description'] ?? 'View content from supported platforms.') ?>">
|
<meta property="og:description" content="<?= htmlspecialchars($immediateResult['description'] ?? 'View content from supported platforms.') ?>">
|
||||||
<meta property="og:image" content="<?= htmlspecialchars($immediateResult['mediaurls'][0] ?? 'placeholder.jpg') ?>">
|
<meta property="og:type" content="<?= htmlspecialchars($immediateResult['type'] ?? '') ?>">
|
||||||
|
<meta property="og:image" content="<?= htmlspecialchars($immediateResult['image'] ?? '') ?>">
|
||||||
|
<meta property="og:video" content="<?= htmlspecialchars($immediateResult['video'] ?? '') ?>">
|
||||||
<meta property="og:url" content="<?= htmlspecialchars("https://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}") ?>">
|
<meta property="og:url" content="<?= htmlspecialchars("https://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}") ?>">
|
||||||
<style>
|
<link rel="canonical" href="https://<?= htmlspecialchars(PLATFORMS[$immediateResult['platform']][0] ?? '') ?>/<?= htmlspecialchars($immediateResult['relativeurl']) ?>">
|
||||||
|
<!-- <style>
|
||||||
body {
|
body {
|
||||||
font-family: Arial, sans-serif;
|
font-family: Arial, sans-serif;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -144,7 +205,7 @@ if (isset($_GET['search']) && $_GET['search'] !== '') {
|
|||||||
}
|
}
|
||||||
.history-item {
|
.history-item {
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
padding: 10px 0;
|
padding: 1em 0;
|
||||||
}
|
}
|
||||||
.history-item:last-child {
|
.history-item:last-child {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
@@ -156,6 +217,9 @@ if (isset($_GET['search']) && $_GET['search'] !== '') {
|
|||||||
.history-item div {
|
.history-item div {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
.history-item p {
|
||||||
|
|
||||||
}
|
}
|
||||||
.search-bar {
|
.search-bar {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
@@ -175,40 +239,228 @@ if (isset($_GET['search']) && $_GET['search'] !== '') {
|
|||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
</style> -->
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'Roboto', Arial, sans-serif;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #f0f2f5;
|
||||||
|
color: #1c1e21;
|
||||||
|
}
|
||||||
|
|
||||||
|
iframe {
|
||||||
|
width: 100%;
|
||||||
|
height: 50vh;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
max-width: 900px;
|
||||||
|
width: 90%;
|
||||||
|
margin: 20px;
|
||||||
|
padding: 20px;
|
||||||
|
background: white;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.button {
|
||||||
|
padding: 0.5em;
|
||||||
|
border: 1px solid gray;
|
||||||
|
border-radius: 8px;
|
||||||
|
text-decoration: none;
|
||||||
|
margin: 0.5em;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h1 a {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
font-size: 2rem;
|
||||||
|
color: #1877f2;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
margin-top: 20px;
|
||||||
|
color: #444;
|
||||||
|
border-bottom: 2px solid #1877f2;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1px solid #e6e6e6;
|
||||||
|
padding: 15px 0;
|
||||||
|
transition: background-color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-item:hover {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-item img {
|
||||||
|
/*width: 49%;
|
||||||
|
max-width: 49%;*/
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
/* max-width: 100px;
|
||||||
|
max-height: 100px; */
|
||||||
|
margin-right: 15px;
|
||||||
|
border-radius: 4px;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-item div {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
max-width: 49%;
|
||||||
|
/*padding: 1em;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
img, video {
|
||||||
|
padding: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
img[src=""], video[src=""] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-item strong {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
color: #1c1e21;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
display: -webkit-box;
|
||||||
|
<?php
|
||||||
|
similar_text($immediateResult['title'], $immediateResult['description'], $percent);
|
||||||
|
if ($percent > 90): ?>
|
||||||
|
-webkit-line-clamp: 5;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
<?php endif; ?>
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-item small {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: #606770;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar input {
|
||||||
|
flex: 1;
|
||||||
|
max-width: 600px;
|
||||||
|
padding: 10px 15px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 25px;
|
||||||
|
font-size: 1rem;
|
||||||
|
transition: box-shadow 0.3s, border-color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar input:focus {
|
||||||
|
border-color: #1877f2;
|
||||||
|
box-shadow: 0 0 5px rgba(24, 119, 242, 0.5);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar button {
|
||||||
|
margin-left: 10px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
background-color: #1877f2;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
border-radius: 25px;
|
||||||
|
font-size: 1rem;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar button:hover {
|
||||||
|
background-color: #155dbb;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.search-bar input {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar button {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-item {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-item img {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-item div {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>Content Proxy</h1>
|
<h1><a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>"><?php echo APPNAME; ?></a></h1>
|
||||||
<form class="search-bar" method="get">
|
<form class="search-bar" method="get" action="<?php echo htmlspecialchars($_SERVER['SCRIPT_NAME'] . '/') ?>">
|
||||||
<input type="text" name="search" placeholder="Search history" value="<?= htmlspecialchars($_GET['search'] ?? '') ?>">
|
<input type="text" required="required" name="search" placeholder="Search or Input URL" value="<?= htmlspecialchars($_GET['search'] ?? '') ?>">
|
||||||
<button type="submit">Search</button>
|
<button type="submit">Go 💣️</button>
|
||||||
</form>
|
</form>
|
||||||
<?php if ($immediateResult): ?>
|
|
||||||
<div class="history-item">
|
|
||||||
<img src="<?= htmlspecialchars($immediateResult['mediaurls'][0] ?? 'placeholder.jpg') ?>" alt="Media">
|
|
||||||
<div>
|
|
||||||
<strong><?= htmlspecialchars($immediateResult['title']) ?></strong><br>
|
|
||||||
<small>Platform: <?= htmlspecialchars($immediateResult['platform']) ?> | <?= htmlspecialchars($immediateResult['datetime']) ?></small><br>
|
|
||||||
<?= htmlspecialchars($immediateResult['description']) ?><br>
|
|
||||||
<a href="https://<?= htmlspecialchars($platforms[$immediateResult['platform']][0] ?? '') ?>/<?= htmlspecialchars($immediateResult['relativeurl']) ?>" target="_blank">View Original</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if (isset($searchResults)): ?>
|
<?php if (isset($searchResults)): ?>
|
||||||
<?php foreach ($searchResults as $item): ?>
|
<?php foreach ($searchResults as $item): ?>
|
||||||
<div class="history-item">
|
<div class="history-item">
|
||||||
<img src="<?= htmlspecialchars($item['mediaurls'][0] ?? 'placeholder.jpg') ?>" alt="Media">
|
|
||||||
<div>
|
<div>
|
||||||
<strong><?= htmlspecialchars($item['title']) ?></strong><br>
|
<img src="<?= htmlspecialchars($item['image'] ?? '') ?>">
|
||||||
<small>Platform: <?= htmlspecialchars($item['platform']) ?> | <?= htmlspecialchars($item['datetime']) ?></small><br>
|
<video src="<?= htmlspecialchars($item['video'] ?? '') ?>" controls="controls"></video>
|
||||||
<?= htmlspecialchars($item['description']) ?><br>
|
</div>
|
||||||
<a href="https://<?= htmlspecialchars($platforms[$item['platform']][0] ?? '') ?>/<?= htmlspecialchars($item['relativeurl']) ?>" target="_blank">View Original</a>
|
<div>
|
||||||
|
<p>
|
||||||
|
<strong><?= htmlspecialchars($item['title']) ?></strong>
|
||||||
|
<small><?= htmlspecialchars($item['platform']) ?><!-- | <?= htmlspecialchars($item['datetime']) ?>--></small>
|
||||||
|
</p>
|
||||||
|
<p style="white-space: preserve-breaks; border-left: 2px solid black; padding: 1em; word-break: break-word;"><?= htmlspecialchars($item['description']) ?></p>
|
||||||
|
<p>
|
||||||
|
<a class="button" href="https://<?= htmlspecialchars(PLATFORMS[$item['platform']][0] ?? '') ?>/<?= htmlspecialchars($item['relativeurl']) ?>" target="_blank">Open Original on <code><?= htmlspecialchars(PLATFORMS[$item['platform']][0] ?? '') ?></code></a>
|
||||||
|
<a class="button" href="<?= htmlspecialchars($_SERVER['SCRIPT_NAME'] . '/' . $item['platform'] . '/' . $item['relativeurl']) ?>">Proxatore Permalink</a>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (isset($immediateResult)): ?>
|
||||||
|
<iframe src="<?= htmlspecialchars(makeEmbedUrl($immediateResult['platform'], $immediateResult['relativeurl'])) ?>"></iframe>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user