spee.ch/index.php

44 lines
1.2 KiB
PHP
Raw Normal View History

2017-03-30 01:29:53 +02:00
<?php
2017-03-30 01:49:26 +02:00
error_reporting(E_ALL);
ini_set('display_errors', 1);
2017-03-30 01:29:53 +02:00
define('ROOT_PAGE', 1);
require_once './LBRY.class.php';
$name = ltrim(urldecode($_SERVER['REQUEST_URI']), '/');
2017-03-30 02:40:44 +02:00
if ($name)
2017-03-30 01:49:26 +02:00
{
2017-03-30 02:40:44 +02:00
include './image.php';
2017-03-30 01:49:26 +02:00
exit(0);
}
2017-03-30 02:40:44 +02:00
if (isset($_POST['publish']) && isset($_POST['name']) && isset($_FILES['file']))
2017-03-30 01:29:53 +02:00
{
2017-03-30 02:40:44 +02:00
$success = LBRY::publishPublicClaim($_POST['name'], $_FILES['file']['tmp_name']);
if ($success)
{
header('Location: /' . $_POST['name'] . '?new=1');
}
else
{
echo '<p>Something went wrong publishing your content. We are only somewhat sorry.</p>';
}
2017-03-30 01:29:53 +02:00
exit(0);
}
?>
2017-03-29 22:22:15 +02:00
<!DOCTYPE html>
<h1>spee.ch</h1>
2017-03-30 02:40:44 +02:00
<p>spee.ch is a single-serving site that read and publish images to and from the LBRY blockchain.</p>
<p>Examples:</p>
2017-03-30 01:49:26 +02:00
<ul>
2017-03-30 02:40:44 +02:00
<?php foreach(['thailand', 'doitlive', 'coconuts', 'cow-air-balloon'] as $sampleName): ?>
<li><a href="/<?php echo $sampleName ?>">spee.ch/<?php echo $sampleName ?></a></li>
2017-03-30 01:49:26 +02:00
<?php endforeach ?>
</ul>
2017-03-30 02:40:44 +02:00
<h3>Publish Your Own</h3>
<?php include './publish.php' ?>
<h3>About This Site</h3>
<p>It was built live in a little over 2 hours on March 29th, 2017. You can watch the video here:</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/C9LCapt_OYw" frameborder="0" allowfullscreen></iframe>