Jump to content

Recommended Posts

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.

<?php

error_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;
?>
Link to comment
https://forums.phpfreaks.com/topic/10923-solved-page-title-determines-output/
Share on other sites

$_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.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.