I'm updating my website and in so doing, giving the portfolio a Flash interface. Unfortunately Flash sucks donkey at displaying, say, movies, so I want to be able to pop-up windows to display movies and higher-rez images. And the method I want to do this uses the GET method to pass the URL of the content in question to an HTML (or PHP) document template which would then parse the Query String to display the correct content.
but then I don't know how to make the video_display.php file to display the correct content.
I'll probably make a separate template for JPGs, but I'm guessing the code would be similar. Any help would be greatly appreciated.
Registered: Sep 2000
| IP: Logged
Cartman
just made by the Presbyterian Church
Member # 256
posted
*scratches head*
Waitwaitwaitwaitwait, you want to write a pure PHP-script to display video files a la YouTube? Even though YT (and indeed almost every other video-sharing portal) itself uses embedded Flash because trying to do anything video in PHP is sheer madness? Or am I misinterpreting your intentions?
Registered: Nov 1999
| IP: Logged
posted
You could just post all your video on Y-Tube and hotlink it- just to be an ass, of course.
-------------------- Justice inclines her scales so that wisdom comes at the price of suffering. -Aeschylus, Agamemnon
Registered: Aug 2002
| IP: Logged
Charles Capps
We appreciate your concern. It is noted and stupid.
Member # 9
posted
... if you're going to pass a query string to the PHP file to begin with, why do you want to use Javascript alone to write the URL and what have you?
Overcomplicated.
But if you insist, you can find the query string as: document.location.search
You'll still need to parse it, of course.
Or are you asking how to use PHP to read the query string? If so, you must learn PHP. Or the simple answer is to look in $_GET, but learning all the side effects would be smarter.
Registered: Mar 1999
| IP: Logged
posted
Sorry, I guess I wasn't clear. This is all a bit over my head I'm afraid. Anyway I think I've got it sorted. What I needed was the "document.write" syntax. (I should put in a JS switch to detect whether a visitor has the QuickTime plugin.)
Such that (so long as you have QuickTime installed) this:
works now. For those uncomfortable with the View Source option, basically there's a JavaScript function at the top of the "display_video.html" page which puts everything in the URL after the question mark into a variable. (An admittedly more elegant solution would be to parse different variables out of the document.location.search string.) Meanwhile partway down the page, document.write adds an embed tag with the URL of the content to be displayed.