This commit is contained in:
Kasper Rynning-Tønnesen
2014-08-08 17:52:43 +02:00
parent a2d7de1a8c
commit b610406d5a
3 changed files with 22 additions and 20 deletions

View File

@@ -1,8 +1,8 @@
<?php
if(isset($_POST['thisUrl']))
{
$string = $_POST['thisUrl'];
{
$file = file_get_contents('videos.json');
$data = json_decode($file);
unset($file);//prevent memory leaks for large json.

View File

@@ -67,6 +67,7 @@
success: function() {
console.log("saved");
console.log(response);
}
});
@@ -76,6 +77,7 @@
async: false
}).responseText;
var url = $.parseJSON(response);
console.log(url[0]);
response = url[0];
ytplayer.loadVideoById(response);

View File

@@ -1 +1 @@
["eTwQ4kACymM","y6DHE_5drbM","A8P01EjBQxY","dMrmfub2TBw","BSAUJIRqAF4","mG6pm1WZ2uc"]
["XU_9yi6xvRs", "mG6pm1WZ2uc"]