Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
CurtisH
Life Cycles Becoming CPU Cycles


Joined: Mar 15, 2004
Posts: 638
Location: West Branch, MI

PostPosted: Thu Jun 02, 2005 2:08 pm Reply with quote

I am curious as to whether the stock HTTP Referrers (In nuke acp) detects referrers to other pages beyond index. It seems to only count referrals to my index page.

I found this in index.php and believe it to be what adds the referrers to the database. Would it work if it was removed (or commented out) from index.php and placed within one of the blocks on the left hand side or even better the header.php (or includes/my_header.php)? If so, what would be the drawbacks of doing so?

code from index.php
Code:
if ($httpref==1) {

    $referer = $_SERVER["HTTP_REFERER"];
    $referer = htmlspecialchars(strip_tags($referer));
    if ($referer=="" OR eregi("^unknown", $referer) OR substr("$referer",0,strlen($nukeurl))==$nukeurl OR eregi("^bookmark",$referer)) {
    } else {
   $result = $db->sql_query("INSERT INTO ".$prefix."_referer VALUES (NULL, '$referer')");
    }
    $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_referer"));
    if($numrows>=$httprefmax) {
   $result2 = $db->sql_query("DELETE FROM ".$prefix."_referer");
    }
}


My goal is to better track who is linking my site. I am getting a lot of traffic to my site but the HTTP Referrers in the ACP is not displaying many. I have visited sites that have links to certain areas of my site and the referral is not added when people view my site via that link. I hope I am making sense. *LOL*

_________________
Those who dream by day are cognizant of many things which escape those who dream only by night. ~Poe 
View user's profile Send private message Visit poster's website Yahoo Messenger
Susann
Moderator


Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Thu Jun 02, 2005 2:38 pm Reply with quote

Code:
I am getting a lot of traffic to my site but the HTTP Referrers in the ACP is not displaying many

Indeed its a litte bit strange with the HTTP Referrers in the ACP.
But there are so many other and better tools to find out who is linking to your site.
 
View user's profile Send private message
CurtisH
PostPosted: Thu Jun 02, 2005 3:10 pm Reply with quote

Could you offer a few suggestions? I would prefer something that works within nuke acp if you know of any. I tried referrers manager but found it to be lacking.
 
gotcha
Regular
Regular


Joined: Mar 14, 2005
Posts: 91

PostPosted: Thu Jun 02, 2005 10:33 pm Reply with quote

If you move that piece of code you posted above, to the header.php or mainfile.php, it will catch referrers to all your pages.
 
View user's profile Send private message Visit poster's website
Susann
PostPosted: Fri Jun 03, 2005 7:05 am Reply with quote

Sorry, I don´t know about any other who works with acp.The awstats modules is bad has backdoors.
I´m using some of this tools and and some other seo tools too.
Only registered users can see links on this board! Get registered or login! Only registered users can see links on this board! Get registered or login! Only registered users can see links on this board! Get registered or login!
counter and referer tools Only registered users can see links on this board! Get registered or login!
counter
 
CurtisH
PostPosted: Fri Jun 03, 2005 7:19 am Reply with quote

gotcha wrote:
If you move that piece of code you posted above, to the header.php or mainfile.php, it will catch referrers to all your pages.


Are you positive? And Raven, can you confirm this as well as inform me of any drawbacks to doing this?

And thank you all for replying. Smile
 
floppydrivez
Involved
Involved


Joined: Feb 26, 2006
Posts: 340
Location: Jackson, Mississippi

PostPosted: Mon Jul 23, 2007 1:51 pm Reply with quote

CurtisH wrote:
gotcha wrote:
If you move that piece of code you posted above, to the header.php or mainfile.php, it will catch referrers to all your pages.


Are you positive? And Raven, can you confirm this as well as inform me of any drawbacks to doing this?

And thank you all for replying. Smile


I have done this and it does not record all refers for some reason. Certain modules refuse to record. I passed $module_name to be recorded also so I could split up the results and view them in order.
 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
floppydrivez
PostPosted: Fri Jul 27, 2007 8:17 am Reply with quote

Ok coming back to this to share some info. I totally customized the referrers and its really nice. However its not a point of interest for some, but I will release a tutorial or something later.

The reason not all refers record is because of this following snipplet in the code.
Code:
!stripos_clone($referer, 'unknown')


I couldn't really figure out where unkown comes into play. Seems self explanatory, but I would like to do some research on its actual purpose. If anyone can shed some light on that, please do.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©