Jump to content

Web Designing


tumbin14342

Recommended Posts

No, use PHP to update it every time it loads the page. No sense pulling the server if nobody's visiting. A voluntary refresh isn't too hard.

 

 

 

 

 

ok leave that topic.

 

Tell me how can i show embedded media player playlist pane with mediaplayer in the html page.i have created the playlist named playlist.m3u

Link to comment
Share on other sites

You could start a timer with JS and after so long it refreshes the list.

 

What is it going to refresh? You will need to use ajax to sent an http request to a server side language. JS is a client side browser scripting language it does not have to power to do that. You would use js to refresh what ajax returns.

Link to comment
Share on other sites

<?php

// open this directory 

$myDirectory = opendir(".");



// get each entry

while($entryName = readdir($myDirectory)) {

$dirArray[] = $entryName;

}



// close directory

closedir($myDirectory);



//	count elements in array

$indexCount	= count($dirArray);

Print ("$indexCount files
\n");



// sort 'em

sort($dirArray);



// print 'em

print("</pre><table border="1" cellpadding="5" cellspacing="0">FilenameFiletypeFilesize$dirArray[$index]");

	print(filetype($dirArray[$index]));

	print("");

	print(filesize($dirArray[$index]));

	print("</table>\n");<br><br

 

 

 

Put that code in a .php file, place it in a php enabled web server, done?

 

http://www.wampserver.com/en/ Is a good All-In-One

213360.png
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.