Jump to content


This topic is now archived and is closed to further replies.


[SOLVED] Page Title Determines Output

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.


$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');


Share this post

Link to post
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
$location = $_GET[location];

if($location=="blank") {
print('blank page');

Hope this helps you in the right direction.

Share this post

Link to post
Share on other sites
You could also do this.
//insert upgrade page or code here

} else {
// insert regular page code here



Share this post

Link to post
Share on other sites


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.