[SOLVED] The redirect codes are redirecting to a page cannot

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
4cl
Forum Newbie
Posts: 2
Joined: Sun Aug 29, 2004 3:17 pm
Location: Canada

[SOLVED] The redirect codes are redirecting to a page cannot

Post by 4cl »

Hi,

I am no PHP programmer. I tried to find a simple tutorial to show me what I am doing wrong, but most basic tutorials deal with database, etc.

So I hope someone here can help me.

I have a directory where a lot of my listings lead to external affiliate programs that I promote. I need to create a redirect page for tracking purposes.

The Redirect page that I created is sending my visitors to a page cannot be found. I hope someone can tell me what I am doing wrong.

Main points:

1. The redirect page needs to load for 2 seconds minimum before redirecting my visitors.

2. My affiliate listings are on http://www.visual-directory.com/web-ser ... sting.html

3. My redirect page is named "count.php"

4. The redirect page needs to figure out to which affiliate site it needs to redirect my visitors.

Erro Message:

My visitors should be sent to an affiliate URL such as: http://www.qksrv.net/click-1489705-5546130

Instead, they are sent to: http://www.visual-directory.com/trackin ... 05-5546130

MY codes

The URL on my listings which will lead to my redirect page will look like this:

Code: Select all

<a href="../tracking/count.php?url=www.qksrv.net/click-1489705-5546130">
The codes on my redirect page is:

Code: Select all

<?php
$url = @$_GET["url"];

echo "<META HTTP-EQUIV=Refresh CONTENT='2; URL=".$url."'>";

?>
What am I doing wrong?

You can see an example by going to http://www.visual-directory.com/web-ser ... sting.html and clicking on the IMAGE of the last affiliate listing--it says "Web Hosting for only $5 per mo".

Thanks for you help
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Code: Select all

echo "<META HTTP-EQUIV=Refresh CONTENT='2; URL=http://".$url."'>";
4cl
Forum Newbie
Posts: 2
Joined: Sun Aug 29, 2004 3:17 pm
Location: Canada

Post by 4cl »

THANK YOU ! ! !

I had tried all kinds of variation of codes and none of them had worked.
Post Reply