robindean Posted June 1, 2006 Share Posted June 1, 2006 Here's what I'm attempting to do. I'm only one step away from having it operate successfully.a) Person enters my site and has an older version of flash player (let's say v6).b) No matter what, the first page to load is simply "webcast.php"c) Let's assume that "webcast.php" checks a server connection (see code for details) and discovers that the server is offline. No problem ... it prints html code with an embedded flash document which reflects this result.d) The flash document loads and detects whether or not the user has flash player version 8. When it notices that the viewer is using v6, it redirects the browser back to webcast.php ... but with a tag on the end (webcast.php?upgrade)e) The php code in the "webcast.php" document detects that it is titled "webcast.php?upgrade" and therefore displays different html code instead of the embedded flash document.... deep breath ...I'm close, but not there. I know how to do this with javascript but php is new to me. For some reason it ignores my concept of using "else" and embedds everything or ... er ... something.Can I coax one of you to give me a tip on this? A solution? Here's my code thus far.<?phperror_reporting(E_ERROR);ob_start();$server = "robindean.no-ip.info";$port = "80";$churl = fsockopen($server, $port, $errno, $errstr, 3);$location = $_GET['location'];if($location=="webcast.php?blank") {print('blank page');}else if($location=="webcast.php?upgrade") {print('upgrade page');}else if (!$churl) {print('embedded flash server off page');}else {print('embedded flash server on page');}ob_end_flush();return;?> Quote Link to comment https://forums.phpfreaks.com/topic/10923-solved-page-title-determines-output/ Share on other sites More sharing options...
wisewood Posted June 1, 2006 Share Posted June 1, 2006 $_GET[location] is looking for something like this in the address bar...[a href=\"http://www.yourdomain.com/yourfile.php?location=something\" target=\"_blank\"]http://www.yourdomain.com/yourfile.php?location=something[/a]You need to use something like this...address bar showing: webcasp.php?location=blank<?php$location = $_GET[location];if($location=="blank") {print('blank page');}?>Hope this helps you in the right direction. Quote Link to comment https://forums.phpfreaks.com/topic/10923-solved-page-title-determines-output/#findComment-40845 Share on other sites More sharing options...
craygo Posted June 1, 2006 Share Posted June 1, 2006 You could also do this.[code]if(isset($_GET['upgrade'])){//insert upgrade page or code here} else {// insert regular page code here}[/code]Ray Quote Link to comment https://forums.phpfreaks.com/topic/10923-solved-page-title-determines-output/#findComment-40888 Share on other sites More sharing options...
robindean Posted June 1, 2006 Author Share Posted June 1, 2006 Thanks to both of you! I managed to get it working : ) Quote Link to comment https://forums.phpfreaks.com/topic/10923-solved-page-title-determines-output/#findComment-40971 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.