<?php chdir('..'); include "includes/vars.php"; include "includes/functions.php"; $url = $_POST['url']; $name = $_POST['name']; update_stream_playlist($url, $name, null, "", "", "stream", "STREAM");
// We probably ought to handle this. $output = $track->asXML() . "\n" . $output; } else { $output .= $track->asXML() . "\n"; } if ($stncount > 1) { // Don't put the original playlist URL in here if the original playlist // returned multiple stations $playlisturl = ""; } else { $playlisturl = (string) $x->playlisturl; } } } } if (!$found) { update_stream_playlist($_POST['location'], $_POST['station'], $_POST['image'], "", "", "stream", "USERSTREAM"); } else { $output = '<?xml version="1.0" encoding="utf-8"?>' . "\n" . "<playlist>\n" . "<playlisturl>" . htmlspecialchars($playlisturl) . "</playlisturl>\n" . "<trackList>\n" . $output . "</trackList>\n" . "</playlist>\n"; $newname = "prefs/USERSTREAM_" . md5($station) . ".xspf"; if (file_exists($newname)) { debuglog("Fave Already Exists!", "ADDFAVE"); } else { file_put_contents($newname, $output); } } ?> <html></html>