PHP - Hide Video Div, While Audio Continues
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? Similar TutorialsAnyone have access to a youtube video/audio downloader script? I'm sure there are one of these laying around somewhere... Looking for 1. In my php web site the video player appears and plays the video. In Chrome you can right click on the player screen and choose 'inspect element' etc, but another choice is 'Copy video URL'. How can I block that, or hide (or disguise/rename) video URLs?
Hoping someone could help me with hiding a video player if a video is not present in the db. I have split up the code to make it easier to understand. Thanks in advance (int) $ListId=$_GET['ListID']; function mysql_resultTo2DAssocArray ( $result) { $i=0; $ret = array(); while ($row = mysql_fetch_assoc($result)) { foreach ($row as $key => $value) { $ret[$i][$key] = $value; } $i++; } return ($ret); -------------------------------------------------------------------------------------------- $querys = mysql_query("SELECT * FROM video WHERE listingID = '$ListId' "); $Details_video=mysql_resultTo2DAssocArray ($querys); -------------------------------------------------------------------------------------------- <div class="right_col"> <p id='preview'>The player will show in this paragraph</p> <script type='text/javascript' src='/flvPlayer/swfobject.js'></script> <script type='text/javascript'> var s1 = new SWFObject('/flvPlayer/player-viral.swf','player','280','200','9'); s1.addParam('allowfullscreen','true'); s1.addParam('allowscriptaccess','always'); s1.addParam('autostart','true'); s1.addParam('image','/flvfiles/<?php echo $Details_video[0]['imagePath']?>'); s1.addParam('flashvars','&file=/flvfiles/<?php echo $Details_video[0]['videoPath']?>&image=/flvfiles/<?php echo $Deatls_video[0]['imagePath']?>&dock=false&autostart=true'); s1.write('preview'); </script> this Chinese bot or what ever managed to reinsert stuff into a contact form of mine he made adjustments from about half a year ago, now in a field where i get an INT a i got alkdnKJKHkk in mail but 2rand[0,1,1] in the db field also regarding regex for date formats i require only dd-mm-yyyy thats only numbers and 2 dashes thanks Can someone help me I have been working on this problem for some time. I have coded my page to welcome, firstname. At first in my insert I had used the id I have not switched it to the username as id was including everyone of my test names in the welcome. It looks like the sessions are continuing as I am able to go to the private section of the pages. However I am not sure what I have to do to produce the welcome, firstname to go to all the pages and let me know it is allowing the one member to access the private sessions. Also when I use the login form it does not recognize the users. It is like the connection to the database dies i guess. here is my codes. <?php session_start(); ini_set ("display_errors", "1"); error_reporting(E_ALL); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Welcome</title> <style type="text/css"> .background {color: #B56AFF; } </style> </head> <body> <p> <?php /* Program: login.php * Desc: Displays the new member welcome page. Greets * member by name and gives a choice to enter * restricted section or go back to main page. */ if (isset($_SESSION['username'])) { // Set the users session ID include("Connections/connect_to_mysql.php"); //Formulate Query //This is the best way to perform an SQL query $query = mysql_query ("SELECT * FROM `Members` WHERE username={$_SESSION['username']}"); $result = mysql_query($query); $numrows = mysql_num_rows($query); //Check result //This shows the actual query sent to MySQL and the error. Useful for debugging. if(!$result){ $message = 'Invalid query:' . mysql_error() . "\n"; $message .= 'Whole query:' . $query; die($message); } //Use result //Attempting to print $result won't allow access to information in the resource //One of the mysql result functions must be used //See also mysql_result(), mysql_fetch_array(), mysql_fetch_row(), etc. if($numrows!=0){ while($row = mysql_fetch_assoc($query)); $dbusername = $row['username']; $dbpassword = $row['password']; //check to see if they match! if($username==$dbusername&&md5($password)==$dbpassword){ echo "Welcome, ".$_SESSION['firstname']. "!<br><a href='logout_test.php'>Logout</a>"; } } } ?> </p> <p> </p> <p>Your new Member accounts lets you enter the members only section of our web site. You'll find special discounts, a profile of matches, live advise from experts, and much more.</p> <p>Your new Member ID and password were emailed to you. Store them carefully for future use.</p> <div style="text-align: center"> <p style="margin-top: .5in; font-weight: bold"> Glad you could join us!</p> <form action="profile.php" method="post"> <input type="submit" value="Enter the Members Only Section"> </form> <form action="index.php" method="post"> <input type="submit" value="Go to Main Page"> </form> </div> </body> </html> <?php session_start(); ini_set ("display_errors", "1"); error_reporting(E_ALL); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Welcome</title> <style type="text/css"> .background {color: #B56AFF; } </style> </head> <body> <p> <?php /* Program: login.php * Desc: Displays the new member welcome page. Greets * member by name and gives a choice to enter * restricted section or go back to main page. */ if (isset($_SESSION['username'])) { // Set the users session ID include("Connections/connect_to_mysql.php"); //Formulate Query //This is the best way to perform an SQL query $query = mysql_query ("SELECT * FROM `Members` WHERE username={$_SESSION['username']}"); $result = mysql_query($query); $numrows = mysql_num_rows($query); //Check result //This shows the actual query sent to MySQL and the error. Useful for debugging. if(!$result){ $message = 'Invalid query:' . mysql_error() . "\n"; $message .= 'Whole query:' . $query; die($message); } //Use result //Attempting to print $result won't allow access to information in the resource //One of the mysql result functions must be used //See also mysql_result(), mysql_fetch_array(), mysql_fetch_row(), etc. if($numrows!=0){ while($row = mysql_fetch_assoc($query)); $dbusername = $row['username']; $dbpassword = $row['password']; //check to see if they match! if($username==$dbusername&&md5($password)==$dbpassword){ echo "Welcome, ".$_SESSION['firstname']. "!<br><a href='logout_test.php'>Logout</a>"; } } } ?> So I have 2 queries, that has the potential to return alot of data, foreach loops running. The first shows each group heading, and the foreach nested is calling another query specific to the group heading. The result currently is a lengthy delay in results showing. (Now this may/may not be the most ideal code practise in this instance however... short term solution discussion please). For Each State Read Each States Details from DB For Each State Listing Display Details Next Next Is there a command or other where I can say, Display HTML page as it stands while it continues to process the FOREACH loops? EG: For Each State Read Each States Details from DB For Each State Listing Display Details REFRESH HTML DISPLAYED Next Next The following code does what I want it to, but after it's done doing it, it won't stop loading. I believe it is because of the while loops (while(1) { ... } and while($data = ...) { ... }). I need while($data = ...) to read the data from the fsockopen. Thanks in advance function ircConnect($server, $port, $channel, $nick, $pass, $name, $msg) { set_time_limit(15); //If we put set_time_limit(0), the page won't timeout and never stops loading (The script works, that I'm aware of) $fp = fsockopen($server, $port); if(!$fp) die($php_errormsg); if(empty($php_errormsg)) { $error = "None!"; } else { $error = $php_errormsg; } echo "<table border='1' bordercolor='#FFCC00' style='background-color:#FFFFCC' width='400' cellpadding='3' cellspacing='3'>"; echo "<tr><td>Server</td><td>Port</td><td>Channel</td><td>Nick</td><td>Password</td><td>Error</td></tr>"; echo "<tr><td>$server</td><td>$port</td><td>$channel</td><td>$nick</td><td>$pass</td><td>$error</td></tr>"; echo "</table>"; fputs($fp, "USER aBot testchan.org TestchanIRCBot :TheBot\n"); fputs($fp, "PASS $pass\n"); fputs($fp, "NICK $nick\n"); fputs($fp, "JOIN $channel\n"); fputs($fp, "PRIVMSG $channel :$msg, my name is $nick!\n"); while($data = fgets($fp, 128)) { $ex = explode(' ', $data); echo nl2br($data); flush(); if($ex[0] == "PING") fputs($fp, "PONG " . $ex[1] ."\n"); } } http://i.imgur.com/E6j79.jpg 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? 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 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 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 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 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
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 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 ?
Edited June 5, 2019 by aveeva 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>'; }
|