PHP - How To Remove Download Option In Audio Control?
Edited June 5, 2019 by aveeva Similar TutorialsHi, I want to force download an asf (audio) file, i have found a script, but it is not for asf but pdf, i was searching for mime types, but not sure what asf classifies? <?php // your file to upload $file = '2007_SalaryReport.pdf'; header("Expires: 0"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); header("Content-type: application/pdf"); // tell file size header('Content-length: '.filesize($file)); // set file name header('Content-disposition: attachment; filename='.basename($file)); readfile($file); // Exit script. So that no useless data is output-ed. exit; ?> i found this page http://www.utoronto.ca/web/htmldocs/book/book-3ed/appb/mimetype.html#audi so sould it be audio/x-wav? Thanks, Ted I have a Joomla website having one folder for audio files in it and their links are saved in database. Now I want to show two calendars to the user at front end, so that they can choose that from when to from he want to download the audio files? for e.g he can select june-2-2014 in one calendar and august-2-2014 in second calendar, now on clicking download button the files residing between the two specific dates must get archived into one zip file and then start downloading... i have a reference link for creating a zip and downloading the zip :http://coursesweb.ne...-archive-php_cs now i am stuck that how to get the selection of user from calendar , save it into the array , and from the array get the files from the folder matching the array indexes and then zip , download them. please tell me how to achieve this task ?
Basically I would like to place a link on my website and have the user download a file, but rather than just right clicking and choosing save target as, the link must be clicked, on the next page the file is fetched and then the client can download the file. How would I go about setting this up please? This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=307346.0 I have made a Php program that downloads an Inno setup installation file for installing a program. However, if I for one or another reason want to make a new download of the same Inno setup installation file, the previous file will still be found in the Download folder. Each of the downloads get a number in parenthesis, setup(1), setup(2), setup(3) etc. However, I wondered if it is posible to erase the previous file in the same process as I download a new one, so that however many downloads I do, there will all the time only be one occurence of this file in the Download folder. The download code is as follows: $exe = "Inno script/Test_setup.exe"; header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"Test_setup.exe\""); header("Content-Length: " . filesize($exe)); readfile($exe); Thanks in advance. Sincerely
First problem fixed. My second problem is if the result is 0X.XX,0 or 0X.XX,1 I would like to remove the first 0 The X.XX are numbers, but the 0 is not always there. Can anyone help please Thanks hey back again, I need help finding something like the audio player found at www.soundowl.com. I need it to be similar in the sense that the URL of the file cannot be found in the source code and this is exactly what I need for my website, any help will be appreciated, thank you in advance I know this can't be accomplished with JUST PHP, however a few questions. I want to create code that will allow users to record an audio message and then this will be saved as a file and linked into my database (hence the PHP/MySQL requirement). How would I go about this? Is it possible? Which languages would I need? I am working on an page where I have a video playing in a div, using jwplayer. I have a form in another div below the player div that appears by changing the display:none property at a certain time, but this requires my users to scroll down to see it below the video div. I would prefer this form div to appear and the video div to disappear simultaneously, which is simple enough, but I need the audio from the video div to continue playing uninterrupted, then the divs would switch back after a period of time. I guess another option would be to have the form div appear and float over the video div, but I'm not sure how to do that. Any nifty suggestions? Hello,
I have been looking for a way to track the play stats on audio mp3's in the admin of my custom post-type. Whatever I google seems to come up with nothing. I not very versed in audio player code - could someone please point me in the right direction.
Again:
I have a custom post-type which uses the wordpress default audio.
I would like to get the number of plays for each audio file and display that in the admin column for my custom post-type
Thanks,
Drew
I really like how Blob and Long blob handle pictures so I decided to try it with audio...I can get the file to upload fine but my problem using the file once its in the database... This is kind of what I am doing. This is my file called get_audio.php: Code: [Select] <?php mysql_connect("localhost","root","") or die(mysql_error()); mysql_select_db("my_db") or die(mysql_error()); $id = addslashes($_REQUEST['id']); $audio = mysql_query("SELECT* FROM wineAudio_tbl WHERE audio_id=$id"); $audio = mysql_fetch_assoc($audio); $audio = $audio['audioFile']; header("Content-type: audio/mp3"); echo $audio; ?> When I want to use the audio I would just have a link something like this: Code: [Select] <a href="get_audio.php?id=12" target="_blank">Play Audio</a> When you click on the "Play Audio" button it opens a browser mp3 player, but does not start the file.. Any ideas what I could be doing wrong ? Hello i need help, I am creating a small social networking website in which i want dat a user can upload music files as well with some descriptions ,the description and file path should be stored in database and the mp3 file should be stored in a seprate folder i want a PHP script for this. If any one knows it then please help me. Hi,
I am trying to build an webapp (PHP script) to display a waveform of my audio (mp3/wav) file same as VocalPitchMonitor app spmething like this This script gets input file from user and then it shows the waveform with notations(music), which has defined and stored in database. I tried https://github.com/boyhagemann/Wave and https://github.com/afreiday/php-waveform-png. with some customized settings. But it generates a wave like this
Is there any script similar to this? or how can i do this? Please suggest Hey all, So I have .caf files that are recorded from my iOS applications and uploaded to my server. Ultimately I want to play these recordings within my website using jPlayer (a jQuery plugin: http://www.jplayer.org), which means they need to be converted from the .caf format. The encoding cannot be done on the mobile device, or so I am told, being that it is too processor intensive. This leaves the webserver... So far I've had very little luck finding any way to convert the file using PHP. I assumed that it would be easy enough to use something like LAME to encode the caf into a mp3. I've seen a few cryptic references to doing exactly this in my google searches, but no definitive information. Can anybody shed some light on the situation? Thanks. Hi, I have limited experience of using PHP, but having done some searching around it would seem that it is possible to convert audio files that are uploaded through a web page to mp3 using ffmpeg. The audio files would be uploaded using the Uploadify script to subfolders that are named according to the user's login. I would need the PHP script to be able to process all audio files that are either not in MP3 format, or are in MP3 format but greater than 192kbps, deleting the original file after the conversion. Am I right in thinking that this could be achieved using PHP, and if so, can anyone get me started with some code, or a link to a webpage with some code? Also, I am currently using Hostpapa for hosting my website, and I understand that they don't include ffmpeg, and also don't allow ssh. I read on one website that I could still install a compiled version of ffmpeg on a shared server, but I am not sure if this means that it would work on Hostpapa, or whether I would need to change my host to get ffmpeg working. Any advice on any of this would be welcome! Thanks, Nick Anyone have access to a youtube video/audio downloader script? I'm sure there are one of these laying around somewhere... Looking for 1. I have php code that uses mp3 audio files stored in a database for the user to listen to. The page loads and the audio controls work and the files play on a desktop and laptop just fine. When trying to play a file on an android or IPhone, when you press the play (or any other control) nothing happens. It acts like the page is static. There is a home button on the webpage and it works so I know the page is interactive. Below is the code. I would appreciate any help. Thank you.
<?php Hi, i have the following code: where i want the sound to only play during the false part of the IF statement but currently it always plays on every reload, and even if the IF = true any ideas? ive tried autoplay="0" also
Thanks
<embed src="beep.wav" autostart="false" width="0" height="0" id="sound1" enablejavascript="true"> + <script> function PlaySound(soundObj) { var sound = document.getElementById(soundObj); sound.Play(); } </script> + if( isset( $json['Data'] ) ){ echo "<b>Success</b>"; echo "</br>"; echo $data.' x ' .$tqty; echo "</br>"; } else { echo "Error"; echo "</br>"; echo $json['Message']; echo '<script> PlaySound("Sound1"); </script>'; }
All, I have a script I wrote that works off a local machine directory, scans it for .html files and uploads those to the server. This works fine in test on my machine with WAMP installed and running localhost, but the activities are for reading/posting the files into my WordPress website and when I move the script to the host, the directory listings are now always the directory on the host machine and I have not figured out how to transfer the directory control back to the local machine. I captured the local directory setting into a 'tools' table I installed into the host MySQL DB. I have searched online for a good example of how to do this, both in the PHP libraries and the JavaScript libraries and have not found a good solution yet. I'm sure there is an example out there, but sure I just do not have the right keywords to find it, so would appreciate a link from anyone who has knowledge on where such a resource might be. Thanks! OMR Hi, I have a question. is that code below made a problem in google search, mean if I put this codes in header did google find my homepage? header( 'Cache-Control: no-store, no-cache, must-revalidate' ); header( 'Cache-Control: post-check=0, pre-check=0', false ); header( 'Pragma: no-cache' ); header( 'Expires: Mon, 26 Jul 1997 05:00:00 GMT' ); header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); Thnx. T |