main url fix

This commit is contained in:
Nicolas A. Tonne
2014-08-08 16:47:01 +02:00
parent a4951a2774
commit c526f00ecf
4 changed files with 26 additions and 25 deletions

View File

@@ -1,4 +0,0 @@
Zöff
====
The shared youtube radio

View File

@@ -25,7 +25,7 @@
</div> </div>
<script type="text/javascript" src="static/swfobject.js"></script> <script type="text/javascript" src="static/swfobject.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript" scr="main.js"></script> <script type="text/javascript" scr="./main.js"></script>
<script> <script>
$(document).ready(function(){ }) $(document).ready(function(){ })
</script> </script>

View File

@@ -1,21 +1,26 @@
<?php <?php
if(isset($_POST['thisUrl'])) if(isset($_POST['thisUrl']))
{ {
$string = $_POST['thisUrl']; $string = $_POST['thisUrl'];
{
$file = file_get_contents('videos.json'); $file = file_get_contents('videos.json');
$data = json_decode($file); $data = json_decode($file);
unset($file);//prevent memory leaks for large json. unset($file);//prevent memory leaks for large json.
//insert data here //insert data here
if($data[0] == $string) if($data[0] == $string)
{ {
array_push($data, $string); array_push($data, $string);
array_shift($data); array_shift($data);
} }
file_put_contents("videos.json", json_encode($data)); file_put_contents("videos.json", json_encode($data));
unset($data); unset($data);
}else }else
{ {
echo "You're a bad boy"; echo "You're a bad boy";
} }
?> ?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB