Volledige versie bekijken : muziek script!
najibzine
%Europe/Berlin %019 %2007, 00:27
beste mensen ik ben opzoek naar een muziek script waardoor ik alleen de muziek albums hoef te uploaden op mijn webhosting en dat de script zelf de mappen kan lezen en in een rij kan zetten een soort zina scripts maar dan met fotos kan iemand me hierbij helpen
Dauntless
%Europe/Berlin %031 %2007, 00:44
Gelieve je taal te verzorgen (Hoofdletters & leestekens). Dat maakt het voor ons ook gemakkelijker om je te begrijpen.
Het vragen om kant en klare scripts is niet toegestaan op FF. Wat heb je zelf al opgezocht / ondernomen ?
najibzine
%Europe/Berlin %044 %2007, 01:03
nou heb wel paar script gezocht maar tot nu toe niet echt goed resultaat
najibzine
%Europe/Berlin %773 %2007, 18:34
??? niemand?
Bargok
%Europe/Berlin %924 %2007, 22:10
Eigenlijk mag ik je niet helpen aangezien je om een direct script vraagt.
Tevens weet ik totaal niet wat je php kennis is, maar hier in 1 minuut geschreven een duwtje in de richting ;).
// Recursive function
function readDir($a_dirname, array $a_extensions = false) {
// Our return value
$filestructure = array();
// Check if the dir given exists and is indeed a directory.
if (file_exists($a_dirname) === false ||
is_dir($a_dirname) === fakse) return false;
// Create a readdir resource
$handle = opendir($a_dirname);
// Check if dir is open for reading, of simply failed
if ($handle === false) return false;
// Loop trough the files/directories inside our $a_dirname
while (false !== ($filename = readdir($handle))) {
// Check if file truely exists
if (file_exists($basedir.$filename) === false) continue;
// Check if the value is a directory
if (is_dir($basedir.$filename)) {
// Loop trough this directory
$filestructure[$a_dirname][] = readDir($basedir.$filename, $a_extensions);
continue;
}
// Is asked for, check for correct extensions
if ($a_extensions !== false && in_array(substr($filename, strrpos($filename, "."), $a_extensions) === false) continue;
// add file to array
$filestructure[$a_dirname][] = $file;
}
// Return array
return $filestructure;
}
$basedir = 'music/albums/';
$extensions = array();
$extensions[] = '.mp3';
$files = readDir($basedir, $extensions);
//Fouten overigens onder voorbehoud aangezien ik niet kan testen.
najibzine
%Europe/Berlin %951 %2007, 22:50
hartelijk dank voor je reactie Bargok maar hij doet het niet hellaas
Dauntless
%Europe/Berlin %958 %2007, 22:59
Zoek dan op wat alle commando's doen en dan zal je vinden hoe je het script moet gebruiken & implementeren.
Jan
%Europe/Berlin %967 %2007, 23:13
is_dir($a_dirname) === fakse) return false;
false...
jan
bouke_
%Europe/Berlin %527 %2007, 12:39
Ik probeer iets soort gelijks ik wil de muziek uit een map allemaal apart in een music player.
Ik heb een werkend php script alleen duurt het lang met laden (ook gepost laatst gepost in een topic door mij) Mischien heb je wat aan het script en de link (http://bdata.bd.funpic.org/musicloader.php) <head>
<title>Uploads</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body {
background-color: #FFFFFF;
}
-->
</style></head>
<body>
<?php
$a = '10'; //aantal plaatjes op 1 pagina
$locatie = 'music'; //map van muziek
$width = '400'; //breedte
$height = '15'; //hoogte
//
if (!isset($_GET['pagina'])) { $pagina = 1; } else { $pagina = $_GET['pagina']; }
$dir = opendir($locatie);
$nr = '1';
// Haal de gegevens uit dir
while (false !== ($file = readdir($dir))) {
if (($file !== ".") and ($file !== "..")) {
list($filename, $ext) = explode(".", $file);
list($main, $sub, $include) = explode("/", $PHP_SELF);
$files[$nr] = $file;
$nr++;
}
}
$a0 = count($files);
$a1 = ($a0/$a);
$a2 = round($a1);
if ($a1 > $a2) {
$a2++;
}
$i = '1';
while ($i != ($a2 + 1)) {
if ($pagina == $i) {
$j = (($a * $i)-$a);
$afb = ($j + 1);
while ($j != ($a * $i)) {
if ($afb > $a0) {
$j = ($a * $i);
}
else {
echo "\n";
echo "<object
classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\"
width=\"400\" height=\"15\" title=\"Musicplayer\"><param
name=\"movie\" value=\"http://www.freewebs.com/bdata/musicplayer.swf?&repeat=true&song_url=$locatie/$filename.$ext&song_title=$filename\&\" />\n";
echo " <param name=\"quality\" value=\"high\" />\n";
echo " <embed
src=\"http://www.freewebs.com/bdata/musicplayer.swf?&repeat=true&song_url=$locatie/$filename.$ext&song_title=$filename\&\" quality=\"high\"
pluginspage=\"http://www.macromedia.com/go/getflashplayer\"
type=\"application/x-shockwave-flash\" width=\"400\"
height=\"15\"></embed>\n";
echo " </object>\n";
echo " ";
$afb++;
$j++;
}
}
//pagina nummers met links
$l = '1';
echo "<br><br>";
while ($l != ($a2 + 1)){
if ($l == $pagina){
echo "<b>[$l]</b> ";
}
else {
echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?pagina=$l\">[$l]</a> ";
}
$l++;
}
}
$i++;
}
?>
</body>
</html>
najibzine
%Europe/Berlin %673 %2007, 16:09
Bouke_ bij je vorbeeld werkt dat script ook niet zo goed ik zie alleen dit [1]
najibzine
%Europe/Berlin %711 %2007, 17:05
Bargok bij jou script heb ik dit error Default value for parameters with array type hint can only be an array or NULL in url
Bargok
%Europe/Berlin %782 %2007, 18:47
Bargok bij jou script heb ik dit error Default value for parameters with array type hint can only be an array or NULL in url
Draai je php 5?
Zo ja, dan is het 2de argument wat je meestuurt geen array.
Zo nee, sloop dan typehinting uit de functie :).
najibzine
%Europe/Berlin %978 %2007, 23:29
ik draai php 5 ja ik zal die type hint weghalen en zal ik je zeggen wat het is geworden
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.