Jump to content
Fórum Script Brasil
  • 0

Player de de áudio




$site = $_SERVER['HTTP_HOST'];
$dir_name = dirname($_SERVER['PHP_SELF']);
$current_url = "http://$site$dir_name/";
$asx = "asx.php";
$radio = new szsystem(''.$current_url.''.$asx.''); //URL e caminho do (asx.php)//
class szsystem { 
var $attribs;
function __construct($src) {
//uncomment line above when really needed
function attrib($name, $value) {
$this->attribs[$name] = $value;
function __toString() {
foreach($this->attribs as $name => $value) {
$tmp .= " $name='$value'";
return "<embed$tmp></embed>";
<!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">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="somzuada" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>HG SISTEMAS</title>
<style type="text/css">
body,td,th {
font-family: Georgia, Times New Roman, Times, serif;
  <p>&nbsp;  </p>


header("Content-Type: audio/x-ms-asf"); 
header("Content-Disposition: filename=radio.asx"); 
header("Pragma: no-cache");
header("Cache: no-cache");
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
$site = $_SERVER['HTTP_HOST'];
$dir_name = dirname($_SERVER['PHP_SELF']);
$current_url = "http://$site$dir_name/";
$dir = 'musicas'; //Pasta das musicas//
$url = ''.$current_url.''.$dir.'';
$ext = array('mp3', 'wma'); //Extenções de áudio permitidas//
$files = array();
foreach(new DirectoryIterator($dir) as $item) {
if($item->isFile() && in_array(strtolower(substr($item, -3)), $ext)) {
$files[] = "$url/$item";
mt_srand((double)microtime()*1000000); //randoniza as musicas//
print join("\n", $files);
Não esqueça da pasta (musicas)
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...