Thanks for your reply silkfire. I took your advise and am gaining ground now.
<?
$url = 'http://192.168.0.5/motion/';
$files = glob('*.flv');
$files = array_filter($files, 'is_file');
$playlist = array(
'0' => array(
'0' => array(
'src' => "$url$files[1]",
'type' => 'video/flv',
),
'config' => array(
'title' => "Movies",
'poster' => 'uebere.png')
),
);
for ($i=0; $i < 10; $i++) {
$playlist[$i]['src'] = "$url$files[$i]";
}
echo json_encode($playlist);
?>
I have an output like this now..
[{"0":{"src":"http:\/\/192.168.0.5\/motion\/37-20110729210403.flv","type":"video\/flv"},"config":{"title":"Movies","poster":"uebere.png"},"src":"http:\/\/192.168.0.5\/motion\/36-20110729205848.flv"},{"src":"http:\/\/192.168.0.5\/motion\/37-20110729210403.flv"},{"src":"http:\/\/192.168.0.5\/motion\/38-20110730054357.flv"},{"src":"http:\/\/192.168.0.5\/motion\/39-20110730055121.flv"},{"src":"http:\/\/192.168.0.5\/motion\/40-20110730055815.flv"},{"src":"http:\/\/192.168.0.5\/motion\/41-20110730060257.flv"},{"src":"http:\/\/192.168.0.5\/motion\/42-20110730060802.flv"},{"src":"http:\/\/192.168.0.5\/motion\/43-20110730061421.flv"},{"src":"http:\/\/192.168.0.5\/motion\/44-20110730062055.flv"},{"src":"http:\/\/192.168.0.5\/motion\/45-20110730062633.flv"}]
I am just missing the "0": before eacho {"src": line.
Any help?
Thanks