Include file containing sound if time is less than code
Page 1 of 1
Include file containing sound if time is less than code
Include a sound if time matches desired time for example if more or less than 1 (so for new messages a sound can be heard)!
the sound file example:
- Code:
$convertedTime = '';
$when = '';
$timeAgoObject = new convertToAgo; // Create an object for ago
$convertedTime = ($timeAgoObject -> convert_datetime($postdate));
$when = ($timeAgoObject -> makeAgo($convertedTime));
$now = date('Y-m-d H:i:s');
if($when < '1'){
include 'chat_sound.php';
}
the sound file example:
- Code:
<?php
$soundclip ="media/new_message.mp3";
?>
<audio id="sound" src="<?php echo $soundclip;?>" type="audio/mp3" autoplay="yes"></audio>
<div id="sound"></div>
Similar topics
» Allowing massive file upload sizes in linux apache2 webserver php.ini file edit
» time countdown code with colours
» Javascript Clock Time Code for HTML Web Dev 2015
» Sound FX And Sound Clips
» chat notifications sound audio for webpage using js
» time countdown code with colours
» Javascript Clock Time Code for HTML Web Dev 2015
» Sound FX And Sound Clips
» chat notifications sound audio for webpage using js
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum