954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Change File Extension Before Going To .SWF File

I have a file, which is not hosted on my site, which I need to stream through an FLV player which I made on flash. But the problem is that the file I need to stream is not named 'file.flv' it is named 'file.rar'. However it is an flv file not a rar. If you rename the file to .flv it plays.

So what I need to do is to some how change the extention to .flv before it goes into the flv player. I know its possible becuase another site is doing a similar thing.

I have found this file which should work but I dont know how to apply it. Its for .htaccess

AddType application/x-httpd-php .gne


If I have not explained this clearly enough please tell me what you dont understand.

Thanks guys

!Unreal
Junior Poster
112 posts since Dec 2007
Reputation Points: 11
Solved Threads: 2
 

Umm.. The AddType will 'inform' php parser to parse files with .gne extension just like a php file. I don't think that will solve your problem. Why don't you use rename to rename your .rar file to .flv ?

nav33n
Purple hazed!
Moderator
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
 

The files are not hosted on my server so I cant use that function unfortunately.

!Unreal
Junior Poster
112 posts since Dec 2007
Reputation Points: 11
Solved Threads: 2
 

You can do it this way (I think). Since it has a .rar extension, you can download the file to the temp folder, rename it and then stream it. :S I don't know about any other possible way.

nav33n
Purple hazed!
Moderator
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
 

How would I automatically download it? Also my bandwidth would be huge because each time the video is viewed it would have to be downloaded from one server to another then streamed.

!Unreal
Junior Poster
112 posts since Dec 2007
Reputation Points: 11
Solved Threads: 2
 

Nevermind. Thats a bad idea. :( I still can't think of a way to achieve this. Anyone else has any ideas on this one ?

nav33n
Purple hazed!
Moderator
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You