Closed Thread Icon

Topic awaiting preservation: dynamically created playlist Pages that link to <a href="https://ozoneasylum.com/backlink?for=27582" title="Pages that link to Topic awaiting preservation: dynamically created playlist" rel="nofollow" >Topic awaiting preservation: dynamically created playlist\

 
Author Thread
EDDII
Bipolar (III) Inmate

From:
Insane since: May 2004

posted posted 03-02-2006 17:23

ok what i have is a dynamically created playlist for my site
the way i have done this is to have a mod rewrite setup so that
whatever.asx actually gives me playlist.php?do=whatever
this works fine when i use it in the <embed> tag but i also have links to the playlists and i would like them to react like normal playlists wich is to open them in windows media player (or whatever player) but instead it treats them as php and just shows me the playlist, any help?

DL-44
Lunatic (VI) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 03-02-2006 18:54

when you say "do=whatever"....what is "do" and what is "whatever"??

That will determine what gets........done.

I would assume that with the setup you ahve, you will need to read that variable and then embed the appropriate object accordingly.

_Mauro
Paranoid (IV) Inmate

From:
Insane since: Jul 2005

posted posted 03-02-2006 18:58

I don't fully understand your question, care to share links about asx and the other specifications, and/or one to your current web page (if possible)?
Anyway it sounds like a bad mime-type issue.
--------------------------------------------------
Mime-types are headers used to tell an app how to process a given content.
Do you have an .htaccess, which kind of web server is it? Apache I guess.

Then, you can use the .htaccess to do something like:

AddType video/x-ms-wmx .asx

Use the following reference for mime types related to asx, and pick the one which corresponds to your usage (video? mpeg2? windows media used?).
http://filext.com/detaillist.php?extdetail=ASX

--------------------------------------------------
Another way to do this would be a php script which sends the mime type as an http "content-type" header (header command in php, see the php manual for details),
and passes the asx file thru. (passthru command in php I think).


..Let me know how it works.

EDDII
Bipolar (III) Inmate

From:
Insane since: May 2004

posted posted 03-02-2006 19:04

sorry that was incredably dumb of me
it just needed a

code:
header("Content-type: vide/x-ms-asf");


i realised but i couldnt this place kept timing out

i will answer anyway, say i have 20 tracks, i put them in an array and then it selects say track "15" by doing 15.asx then it selects all the information for track 15 from the array and plays it or it can select all tracks and play them randomly

_Mauro
Paranoid (IV) Inmate

From:
Insane since: Jul 2005

posted posted 03-02-2006 19:17

No prob with asking, I think the forum's purpose is to answer. Check the "htaccess" way to do it if you think you could need it (in my above post).

EDDII
Bipolar (III) Inmate

From:
Insane since: May 2004

posted posted 03-02-2006 23:24

i have done it as a htaccess using simple mod rewrite
but it seems to be behaiving like a php rather than the asx file
and also shouldnt the .asx file work in that way without having to do the htaccess thing as it is a real file type

_Mauro
Paranoid (IV) Inmate

From:
Insane since: Jul 2005

posted posted 03-03-2006 00:04

Hmm.. mod rewrite?
use the "header" command then.
Since your mod rewrite targets a ".php" url, I find it logical for the web server to serve a php file. So just stick with "header".

But you still should declare the file type, the mime type anyway in the .htaccess file.

For a good further reference, here is the MIME protocol spec
http://www.faqs.org/rfcs/rfc1521.html

MIME specifies internet message bodies, hence the fact it is used to carry webpages and emails.

To answer your question, what makes it a "real" file type?
The extension alone is not enough to identify a file type consistently, binary files have internal headers, and MIME informations are carried
by www servers/clients as an additional measure.

« BackwardsOnwards »

Show Forum Drop Down Menu