View previous topic :: View next topic |
Author |
Message |
gog
Joined: 18 Jun 2004 Posts: 679 Location: zagreb
|
Posted: 13.09.2005 12:23 Post subject: shortstats i pogodak.hr |
|
|
Ukoliko netko koristi shortstats ( http://www.shauninman.com/ ) a želio bih vidjeti i upite na www.pogodak.hr tražilici preko kojih su posjetitelji došli na njegov site neka prati pozorno
Treba editirati functions.php datoteku i to funkciju SI_sniffKeywords();
U ovoj velikoj if .. then ... else petlji treba na kraju dodati:
Code: | else if (preg_match("/pogodak\./i", $url['host'])) {
parse_str($url['query'],$q);
// Pogodak search terms are in "q"
$searchterms = $q['q'];
} |
|
|
|
Back to top |
|
|
maratz mi3.crew
Joined: 24 Nov 2003 Posts: 1207 Location: ZAG
|
|
Back to top |
|
|
Sulien
Joined: 04 Jan 2004 Posts: 2905 Location: Zagreb
|
Posted: 13.09.2005 13:05 Post subject: |
|
|
na sljedeći način stvar može biti rješena sa manje opterećivanja istog stringa mnogobrojnim regexpima (treba primijetiti da se kod mene funkcija ne zove isto)
Code: | function referer_searchterms($referer){
if(!$referer = @parse_url($referer)) return NULL;
if(!isset($referer['host']) || !isset($referer['query'])) return NULL;
if($referer['host'] == $_SERVER['HTTP_HOST']) return NULL;
$searchterms = $key = '';
parse_str($referer['query'], $q);
// Check for Google or other Q-like first
if(preg_match("/(google|alltheweb|pogodak\.hr|search\.msn)\./i", $referer['host'])) $key = 'q';
else if(preg_match("/yahoo\./i", $referer['host'])) $key = 'p';
else if(preg_match("/search\.aol\./i", $referer['host'])) $key = 'query';
if(!$key) return NULL;
$searchterms = @$q[$key];
return stripslashes($searchterms);
} |
Ne bi trebalo zaboraviti i dodati Pogodak spidera na popis botova u funkciji koja snifa browser... |
|
|
Back to top |
|
|
gog
Joined: 18 Jun 2004 Posts: 679 Location: zagreb
|
Posted: 13.09.2005 15:01 Post subject: |
|
|
Najs, budem pogledao kada ulovim vremena..
@maratz, ne kužim što znači gg! ? |
|
|
Back to top |
|
|
stripe
Joined: 24 Jan 2004 Posts: 816
|
Posted: 13.09.2005 15:45 Post subject: |
|
|
Google wrote: | The Gg are a fictional race of beings featured in the sci-fi Star Control computer game series. |
gg - znaci da maratz najvjerojatnije igra quake malo previse |
|
|
Back to top |
|
|
Sulien
Joined: 04 Jan 2004 Posts: 2905 Location: Zagreb
|
Posted: 13.09.2005 18:32 Post subject: |
|
|
pa mogao si mu i reći do kraja, stripe
gg = great game |
|
|
Back to top |
|
|
silence
Joined: 24 Apr 2004 Posts: 890 Location: .....ni na nebu, ni na zemlji.....
|
Posted: 13.09.2005 18:34 Post subject: |
|
|
gl&hf |
_________________ This End-User License is an agreement between Microsoft Corporation (hereafter referred to as "Microsoft") and you, the end-user (hereafter referred to as "our bitch"). |
|
Back to top |
|
|
|