Forum Moderators: coopster

Message Too Old, No Replies

Simple problem but can't figure it out.

         

wolfridr

8:10 pm on Jul 26, 2009 (gmt 0)

10+ Year Member



I have a rotating flyer on my main page that when people click on it, I want it to open a new page. However, I am getting an incorrect redirect which is this :"http://www.example.com/mock-page.php?hash=http://www.example.com/home/thursday.php" My hash is correct, so why isn't it opening that page? Thanks so much in advance for your advice!

Kris West

I'm just not sure what I'm doing wrong.

This is my flyerflip file:

<?header("Expires: Mon, 15 Sep 2008 05:00:00 GMT");

header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

header("Cache-Control: no-store, no-cache, must-revalidate");

header("Cache-Control: post-check=0, pre-check=0", false);

header("Pragma: no-cache");

echo ("<?xml version='1.0'?>");

?>

<flyers>

<item q="2" sat="2008-08-16" nw="2008-08-21" date="0000-00-00" DOW="" filename="/images/flyers/featured/thursdaysnew.jpg" link="http://www.example.com/home/thursday.php" featuredTime="5000"><![CDATA[]]></item>

<item q="2" sat="2008-08-16" nw="2008-08-21" date="0000-00-00" DOW="" filename="/images/flyers/featured/happy_hour.jpg" link="http://www.example.com/home/friday.php" featuredTime="5000"><![CDATA[]]></item>

<item q="2" sat="2008-08-16" nw="2008-08-21" date="0000-00-00" DOW="" filename="/images/flyers/featured/saturdays.jpg" link="http://www.example.com/home/saturday.php" featuredTime="5000"><![CDATA[]]></item>

<item q="2" sat="2008-08-16" nw="2008-08-21" date="0000-00-00" DOW="" filename="/images/flyers/featured/sundaynew.jpg" link="http://www.example.com/home/sunday.php" featuredTime="5000"><![CDATA[]]></item>

</flyers>

It calls my mock-page.php which looks like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<?
$qs = ucfirst(str_replace("hash=","",$_SERVER['QUERY_STRING']));
$qs = str_replace ("/", " - ", $qs);
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Name ¦ Nightclubs ¦ Night Life- <?=$qs?></title>
<script type="text/javascript">
function getLocation() {
return '<print "http://" .$_SERVER['QUERY_STRING'] ?>';
}

</script>
</head>
<body>
<?php
print "hash: [" . $_GET['hash'] . "]<br />";
print "self: [" . "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'] . $_SERVER['QUERY_STRING'] . "]";
?>
</body>
</html>

[edited by: eelixduppy at 11:36 pm (utc) on July 26, 2009]
[edit reason] exemplified [/edit]

eelixduppy

2:01 am on Jul 31, 2009 (gmt 0)



I'm not sure what you are trying to do here but you do have an error on this line:

return '<?php print "http://" .$_SERVER['QUERY_STRING'] ?>';

You were missing the whole PHP open tag.