Creating web pages out of playlists

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Yeah, I looked into some PHP stuff for the file uploading but I don't know how I am going to get it all to work.

Probably end up doing something like:
User uploads file in HTML environment by calling a PHP scriptything.
PHP then uploads file, saves it in one folder, and then puts it in another folder with the Java Applet. Redirects to page with Java Applet and Java Applet has code ready to be used because the Java Applet will automatically give code to the file just uploaded. (It will delete the file/clear-it after it is done converting it to HTML)


This all relies on me actually having a server to put it too... So annoying since I don't have a testbed for this shit.

You have a few options there. If you have an old box lying around you can always dump a distro on it and run apache as a local test server. I have debian running on some really old dell box... P4 I think, with like 1 gig of ram.

You can also get a very complete monthly hosting package from someone like Rochen for around $12.95/mo. Grab one of those for a few months for testing and beta. With Rochen you get ssh shell access, optimized apache, databases, ftp accounts, email addys, the works. There are plenty of other choices too, but I my direct experience is with Rochen and Network Solutions, and since I moved from NetSol to Rochen you can figure out which I recommend :).
 

darkewaffle

Diamond Member
Oct 7, 2005
8,152
1
81
Whenever I saw the title of this post my mind automatically filled in "playlists" with like "macaroni!" or "paper plates and glitter!" as though it would be an arts and crafts thread.
 

TridenT

Lifer
Sep 4, 2006
16,800
45
91
You have a few options there. If you have an old box lying around you can always dump a distro on it and run apache as a local test server. I have debian running on some really old dell box... P4 I think, with like 1 gig of ram.

You can also get a very complete monthly hosting package from someone like Rochen for around $12.95/mo. Grab one of those for a few months for testing and beta. With Rochen you get ssh shell access, optimized apache, databases, ftp accounts, email addys, the works. There are plenty of other choices too, but I my direct experience is with Rochen and Network Solutions, and since I moved from NetSol to Rochen you can figure out which I recommend :).

I don't have a separate computer, so that's not possible. Also hosting for that price is far too high. I'm usually looking at like.. as cheap as possible places. These things I do are not going to be high traffic.
 

Jeff7181

Lifer
Aug 21, 2002
18,368
11
81
Not everyone uses Windows?

If your server does, then who cares?

What is your ultimate goal here, to create a web site where any random person can upload their playlist and have it returned to them on a web page? Or are you just doing this for yourself as kind of a one time thing, or a periodic thing where you just parse your playlist(s) and publish it for others to see?
 

TridenT

Lifer
Sep 4, 2006
16,800
45
91
If your server does, then who cares?

What is your ultimate goal here, to create a web site where any random person can upload their playlist and have it returned to them on a web page? Or are you just doing this for yourself as kind of a one time thing, or a periodic thing where you just parse your playlist(s) and publish it for others to see?

I really don't see many windows servers for hosting online. :hmm: Not like I am paying for a dedicated server anyway.

First option, mostly. It would be nice to have it be able to store the information into a database and then create lovely stuff out of that but that's beyond reach right now.
 

Leros

Lifer
Jul 11, 2004
21,867
7
81
You know Java from your basic CS classes?

I would suggest looking into writing Java servlets on a Tomcat server.
 

beginner99

Diamond Member
Jun 2, 2009
5,320
1,767
136
You know Java from your basic CS classes?

I would suggest looking into writing Java servlets on a Tomcat server.

I do really prefer java over php but IMHO for this kind of simple stuff, php is the better choice. PHP hosting is easier to find and cheaper.

I would not start mixing things. PHP, java etc. There is absolutely no need to do that.

I mean you need:

1) HTML form to upload file and some data
2) php script that processes that data
3) web page that displays result

For PHP, google for XAMPP. Package that contains Apache, php and mysql all preconfigured and ready to use. ideal for development. Available on Windows or Linux.
 

TridenT

Lifer
Sep 4, 2006
16,800
45
91
I do really prefer java over php but IMHO for this kind of simple stuff, php is the better choice. PHP hosting is easier to find and cheaper.

I would not start mixing things. PHP, java etc. There is absolutely no need to do that.

I mean you need:

1) HTML form to upload file and some data
2) php script that processes that data
3) web page that displays result

For PHP, google for XAMPP. Package that contains Apache, php and mysql all preconfigured and ready to use. ideal for development. Available on Windows or Linux.

Sigh. PHP seems very difficult to learn without good examples that keep the flow of learning interesting. I remember reading some online book and just going, "Holy shit. This has like 50 chapters... It's thousands of pages long. This is boring as fuck and I am at like page 20."

Edit: Trying to learn some stuff from the php.net website... I need to be driven I guess.
 
Last edited:

TridenT

Lifer
Sep 4, 2006
16,800
45
91
PHP is being weird... I've gotten to uploading the files then processing them but it doesn't see tabs with the files I am using apparently... Nevermind... Apparently single quotes and double quotes with strings makes a world of difference. This language, I swear...

Got the iTunes TXT version done. (PITA much?)
http://www.sendspace.com/file/pfhs6v Here's the PHP version. If you have iTunes then just export a playlist as TXT and use that as the input. I don't know how to make it avoid the error that will appear.

Got the PLS portion done... http://www.sendspace.com/file/yy5hyn
Added M3U, M3U8 support... http://www.sendspace.com/file/kd47co

XML to come... It is probably the most painful to do. (Requires sorting)


EDIT: Made it html tagged output for easy copying into your own HTML document. http://www.sendspace.com/file/57d1w5

EDIT: Alright. Program complete. Added all the functionality. Works with TXT, PLS, XML, M3U, and M3U8. Yay? http://www.sendspace.com/file/96x0tt
 
Last edited:

Leros

Lifer
Jul 11, 2004
21,867
7
81
I do really prefer java over php but IMHO for this kind of simple stuff, php is the better choice. PHP hosting is easier to find and cheaper.

I would not start mixing things. PHP, java etc. There is absolutely no need to do that.

I mean you need:

1) HTML form to upload file and some data
2) php script that processes that data
3) web page that displays result

For PHP, google for XAMPP. Package that contains Apache, php and mysql all preconfigured and ready to use. ideal for development. Available on Windows or Linux.

PHP mixes the code for the logic and the code for the output display (HTML, XML, etc). Java servlets separate the two making it much easier to understand and comprehend later.
 

TridenT

Lifer
Sep 4, 2006
16,800
45
91
PHP mixes the code for the logic and the code for the output display (HTML, XML, etc). Java servlets separate the two making it much easier to understand and comprehend later.

Does PHP have methods you can define like in Java? I swear my PHP file I wrote would be much cleaner if it did.