PDA

View Full Version : Hack for tracking outgoing hits from url's posted in forum


bigbigsavings
10-15-2001, 01:36 AM
Hi guys,

I'm wondering if there's something like this out there, as I've seen it used at several other forums & forum software packages.

Basically, what I'm looking for is something that would track any urls that are clicked on from the forum.

In essence, if someone posts something like

http://www.bigbigsavings.com

It would automatically change the url to

http://www.bigbigsavings.com/track.php3?url=http://www.bigbigsavings.com

So, then I could go into the admin panel of some sort in track.php3 and see all the url's that are getting clicks on from the forum.

Is there anything like this?

Thanks!

Alex

eva2000
10-15-2001, 01:55 AM
why not use an ad script and replacement variables?

bigbigsavings
10-15-2001, 01:56 AM
eva2000,

Care to elaborate? Non-techie here :(

Alex

eva2000
10-15-2001, 02:09 AM
well i.e. if you use an ad banner script or link tracking script and put in the text url. Then in vB admin panel, add a replacement variable to find domain.com and replace it with the ad banner/link tracking url for that text url :)

btw, how's your vB and server hardware holding up ?

bigbigsavings
10-15-2001, 02:18 AM
eva2000,

It's not that easy. I want th program to automatically store any urls' that are posted in the forums, not stuff that I've programmed. Also, as far as I know know, replacing the variables would be more difficult than you make it seem, since you'd have to mess around with the way vbulletin treats (url) tags (replace () with []).

I hope I'm making sense?

As for servers,

Currently Active Users: 496
There are currently 153 members and 343 guests on the boards. | Most users ever online was 943 on 08-13-2001 at 12:27 PM.

Web Server:
10:49pm up 62 days, 12:27, 1 user, load average: 0.85, 1.01, 1.14

Database Server:
11:12pm up 44 days, 3:49, 1 user, load average: 0.51, 0.59, 0.64

Completely stock configuration, haven't touched one config file.

Alex

chrispadfield
10-15-2001, 01:48 PM
I started writing this but never got it to work. In functions.php
i did the following replacement


$replacearray = array(
"<ol type=\"\\5\">\\7</ol>",
"<ul>\\4</ul>",
"<li>",
"<a href=\"http://www.\\6\" target=\"_blank\">\\8</a>",
"<a href=\"\\5\" target=\"_blank\">\\7</a>",
"<a href=\"http://www.\\5\" target=\"_blank\">\\5</a>",
"<a href=\"\\4\" target=\"_blank\">\\4</a>",
"</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>\\5<hr></pre><normalfont></blockquote>",
"</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>\\5<hr></pre><normalfont></blockquote>",
"java script:",
"about :"
);

/*

$replacearray = array(
"<ol type=\"\\5\">\\7</ol>",
"<ul>\\4</ul>",
"<li>",
"<a href=\"http://www.ascifi.com/forums/jump.php?url=http://www.\\6\" target=\"_blank\">\\8</a>",
"<a href=\"http://www.ascifi.com/forums/jump.php?url=\\5\" target=\"_blank\">\\7</a>",
"<a href=\"http://www.ascifi.com/forums/jump.php?url=http://www.\\5\" target=\"_blank\">\\5</a>",
"<a href=\"\\4\" target=\"_blank\">\\4</a>",
"</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>\\5<hr></pre><normalfont></blockquote>",
"</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>\\5<hr></pre><normalfont></blockquote>",
"java script:",
"about :"
);

*/


and then jump.php is


<?

####################### Jump.php by Chris Padfield #######################

require('./global.php');

$DB_site->query("INSERT INTO urllog SET
url = '".addslashes($url)."',
dateline = '".time()."'
");

header("Location: $url");

?>


the problem was the second variables were not working. For example

www.ascifi.com/forums/showthread.php?threadid=45
would be fine
but
www.ascifi.com/forums/showthread.php?session=234&threadid=45

would have threadid=45 dropped of and result in an error.