Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Ezilon Directory   ClickBooth Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 07-24-2004, 12:38 PM   #1 (permalink)
Inactive
 
Join Date: 05-29-04
Posts: 233
iTrader: 0 / 0%
Latest Blog:
None

hurricane_sh is liked by many
Track referrals in PHP

I use the following code to track referral, it works well when user access a PHP page.
<?php
$referrer = $HTTP_COOKIE_VARS["referrer"];
if( $referrer == "")
{
$referrer = $HTTP_REFERER . date("Y-m-d");;
setcookie("referrer",$referrer, time()+60*60*24*365);
}
?>

When user downloads a file directly, I redirect the file to a php file and try to write the referral information, but get nothing, how can I track the referral for this case? Thanks!
hurricane_sh is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 07-25-2004, 05:04 AM   #2 (permalink)
Inactive
 
Join Date: 10-12-03
Location: Cranberry Township
Posts: 275
iTrader: 0 / 0%
niceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really niceniceguyeddie is just really nice
Send a message via ICQ to niceguyeddie
The redirect causes the referrer to be internal, thus you won't get what you are looking for. You could throw a get onto your redirect code and then pass it to your new page, but it might be easier to watch your server logs
niceguyeddie is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-25-2004, 05:21 AM   #3 (permalink)
Inactive
 
Join Date: 05-29-04
Posts: 233
iTrader: 0 / 0%
Latest Blog:
None

hurricane_sh is liked by many
Quote:
Originally Posted by niceguyeddie
The redirect causes the referrer to be internal, thus you won't get what you are looking for. You could throw a get onto your redirect code and then pass it to your new page, but it might be easier to watch your server logs
Thanks for your reply, I did the redirecting with htaccess like :
Redirect permanent VocabolySetup.exe http://www.vocaboly.com/download/dow...abolySetup.exe

How can I pass the referral to downfile.php?
hurricane_sh is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Google Referrals Estreetloans Google Forum 10 08-15-2007 01:02 PM
Umdum & referrals DarrenC Web Directory Issues 4 07-16-2006 01:16 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 12:22 AM.
© Copyright 2008 V7 Inc