This commit is contained in:
Nixo
2014-08-08 16:13:31 +02:00
parent e4c41cdf3f
commit 93463ecd38
9 changed files with 200 additions and 66 deletions

15
main.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
/*$host = 'http://'.$_SERVER['HTTP_HOST'].'/+';
$short = $_SERVER['QUERY_STRING'];*/
$video = htmlspecialchars($_POST['v']);
$name = htmlspecialchars($_POST['n']);
$file = file_get_contents('videos.json');
$data = json_decode($file);
unset($file);
if(isset($_GET['v'])){
array_push($data, $video);
file_put_contents('videos.json', json_encode($data));
}
?>