projectxmatt Posted May 21, 2007 Share Posted May 21, 2007 So im righting a script that plays recorded phone calls...well the phone calls are recorded to a directory "/var/spool/asterisk/monitor/" and i need them to be embeded on a page for us to listen to. I have never had to jump out of the web directory before to grab a file so i haven't the slightest idea of how to do it. Here is the code for the page won't be much help but here it is anyways <?php include("inc/mainfunc.php"); $UID = $_REQUEST['what']; $DB->query("SELECT calldate FROM cdr WHERE uniqueid = '".$UID."'"); list($Calldate)=$DB->next_record(); echo "<embed src='/var/spool/asterisk/monitor/".date("Ymd-his",strtotime($Calldate))."-".$UID.".wav' width=300 height=20 autoplay=true loop=false></embed>"; php?> im sure im missing a whole lot any help would be greatly appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/52360-solved-wav-file-from-out-side-web-directory/ Share on other sites More sharing options...
chigley Posted May 21, 2007 Share Posted May 21, 2007 Why do you need to store the files outside the public directory? I think the only solution would be to make PHP read the file from the /var directory, make a temporary file in the public directory, and delete it after viewing. Quote Link to comment https://forums.phpfreaks.com/topic/52360-solved-wav-file-from-out-side-web-directory/#findComment-258394 Share on other sites More sharing options...
projectxmatt Posted May 21, 2007 Author Share Posted May 21, 2007 i didn't just to store them there the box is a trix box which is a box set up for voip and it has its own interface but the coding on it sucks and i wanted some different things. So i wrote a quick little front end to view call logs and everything and wanted to be able to listen to the recordings. Im just trying to figure out how to get it to play. As right now it won't read cuz it tries to look in /var/www/html/var/spool/asterisk/monitor/ instead of just /var/spool/asterisk/monitor/ Quote Link to comment https://forums.phpfreaks.com/topic/52360-solved-wav-file-from-out-side-web-directory/#findComment-258398 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.