Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
guidyy
Worker
Worker



Joined: Nov 22, 2004
Posts: 208
Location: Italy

PostPosted: Wed Apr 26, 2006 3:58 am Reply with quote

I used this one for a while to save database space
This hack will use sentinel's ip2country table instead of the native for MS_analysis. save 60,000 duplicate records.
in file mstrack.php

locate
Code:


      // Determine Domain
      $result = $db->sql_query( "select c2code from ".$prefix."_msanalysis_iplookup WHERE inet_aton('$MSAdata[real_ip]') >= ip_from AND inet_aton('$MSAdata[real_ip]') <= ip_to" );


replace with
Code:


// Determine Domain
$result = $db->sql_query( "select c2c from $prefix"._nsnst_ip2country." WHERE inet_aton('$MSAdata[real_ip]') >= ip_lo AND inet_aton('$MSAdata[real_ip]') <= ip_hi" );


This was already on Maty's script forum, but it is currently down, so i reposted it here.
Ciao, Guido
 
View user's profile Send private message Visit poster's website MSN Messenger
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Wed Apr 26, 2006 6:36 am Reply with quote

Excellent hack! Thank you for sharing this over here.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Wed Apr 26, 2006 10:10 am Reply with quote

Smart Smile

Wanted to make sure I wasn't behind on IP countries tables either. Maybe just set the Sentinel ones for all scripts I am planning

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
guidyy







PostPosted: Wed Apr 26, 2006 11:23 am Reply with quote

MSA countries table store much more infos than Sentinel, but it's is much smaller than ip2c. I left it alone...
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

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 ©