You are here: Way too braindead this morning.... Simple parsing problem « PHP Programming Language « IT news, forums, messages
Way too braindead this morning.... Simple parsing problem

Posted by CptDondo on 01/20/08 15:24

I have a website that shows flash movies. I want to add a download
button that will download the same movie as a wmv file.

I can't for the life of me figure out how to do this....

The sendfile.php is invoked as

http://www.someserver.com/path/to/php/sendfile.php&image=http://
www.someserver.com/path/to/movies/xyz/movie.flv

what I need to do is to:

take basename of image, replace the .flv wih .wmv, use that as the
filename for 'Content-Disposition: attachment; filename='

replace the http://www.someserver.com/ part with the real path to the
file on the server and use that for the readfile($file) call

The only slighlty complicated thing is that the /xyz/ directory may be
present for some but not for others.

I've been going round and round and the only thing I can think of is that
I have been staring at code too long and haven't had enough coffee....

--Yan

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация