Log in

View Full Version : help with a hack


chrispadfield
09-14-2001, 08:32 PM
I thought it would be interesting to record all the clicks on links across the forum. VB makes this a very easy mod but i am having a problem.

Basically i remake the links to something like found here:
http://ascifi.com/forums/showthread.php?threadid=7189

now my jump.php code looks like:


echo "
<html>
<head><title>Redirecting URL</title>
<meta http-equiv=\"Refresh\" content=\"0; URL=$url\">
$headinclude
</head>
</html>

";


the problem is that $url does not work if the link is something lile


http://www.vbulletin.com/forum/newthread.php?s=&action=newthread&forumid=8

because it goes to &action if you see what i mean.

How do i make it in the query so that $url = the whole bit? including the & ?

thanks!

JamesUS
09-14-2001, 08:41 PM
A better way for you :)


<?php
//record the link in the db or whatever here
//but don't echo anything
header("Location: $url");
?>


As long as you don't echo anything that should be fine.

chrispadfield
09-14-2001, 09:05 PM
thanks James, that is perfect.

Now to do the stats bit :)