diff options
author | TheTroll <trolldev@gmail.com> | 2010-02-27 01:04:29 +0100 |
---|---|---|
committer | TheTroll <trolldev@gmail.com> | 2010-02-27 01:04:29 +0100 |
commit | 0c9414a9fecf2278d468acb1cf184e776b5a15c7 (patch) | |
tree | 4fd8140bb93e525976b3c7acde9cfb2ef3052961 /includes/inc_streaminfo.php | |
parent | 6d9cbb4df3b1aa89126069162dbf9f1e330b5fa6 (diff) | |
download | istreamdev-0c9414a9fecf2278d468acb1cf184e776b5a15c7.tar.gz istreamdev-0c9414a9fecf2278d468acb1cf184e776b5a15c7.tar.bz2 |
Multiple sessions support WIP
Diffstat (limited to 'includes/inc_streaminfo.php')
-rwxr-xr-x | includes/inc_streaminfo.php | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/includes/inc_streaminfo.php b/includes/inc_streaminfo.php index 576bd5d..e41b24f 100755 --- a/includes/inc_streaminfo.php +++ b/includes/inc_streaminfo.php @@ -8,9 +8,11 @@ 3 : Media */ -function writeinfostream($type=0, $name="", $title="", $desc="", $mode="", $category="", $url="", $mediapath="", $subdir="") +function writeinfostream($session, $type=0, $name="", $title="", $desc="", $mode="", $category="", $url="", $mediapath="", $subdir="") { - $infofile = fopen("ram/streaminfo", 'w'); + $ram = "ram/" .$session ."/"; + + $infofile = fopen($ram ."streaminfo", 'w'); fwrite($infofile, "type=" .$type ."\n"); fwrite($infofile, "name=" .$name ."\n"); @@ -26,13 +28,14 @@ function writeinfostream($type=0, $name="", $title="", $desc="", $mode="", $cate } -function readinfostream() +function readinfostream($session) { + $ram = "ram/" .$session ."/"; - if (!file_exists("ram/streaminfo")) + if (!file_exists($session ."streaminfo")) return array(0, "", "", "", ""); - $infofile = fopen("ram/streaminfo", 'r'); + $infofile = fopen($session ."streaminfo", 'r'); if (!$infofile) return array(0, "", "", "", ""); @@ -63,9 +66,4 @@ function readinfostream() return array($type, $name, $title, $desc, $mode, $category, $url, $mediapath, $subdir); } -function infostreamexist() -{ - return file_exists("ram/streaminfo"); -} - ?> |