Answer the question
In order to leave comments, you need to log in
Displaying information from which site the user came from and what keys?
I ran into a problem, when setting up the output of information from which site the user came from and what keys, the Source gives out, but there are no keys, I will be glad for any help from the wp engine.
<?php
if (!isset($_COOKIE['seohvost'])) {
setcookie('seohvost', $_SERVER['HTTP_REFERER']);
}
$referer = (isset($_COOKIE["seohvost"]))? $_COOKIE["seohvost"] : 'Referral link not defined' ;
if (stristr($referer, 'yandex.ru')) { $search = 'text='; $crawler = 'Yandex'; }
if (stristr($referer, 'rambler.ru')) { $search = 'words='; $crawler = 'Rambler'; }
if (stristr($referer, 'google.ru')) { $search = 'q='; $crawler = 'Google';
} if (stristr($referer, 'google.com')) { $search = 'q='; $crawler = 'Google'; }
if (stristr($referer, 'mail.ru')) { $search = 'q='; $crawler = 'Mail.Ru'; }
if (stristr($referer, 'bing.com')) { $search = 'q='; $crawler = 'Bing'; }
if (stristr($referer, 'qip.ru')) { $search = 'query='; $crawler = 'QIP'; }
if (isset($crawler)){
$phrase = urldecode($referer);
preg_match('/'.$search.'([^&]*)', $phrase.'&', $phrase_k);
$phrase = $phrase_k[1];
$referer = $crawler;
}
if(isset($crawler)){
$seacrh = 'Ключи: '.$phrase.' Источник: '.$referer;
}else{
$seacrh = 'Источник: '.$referer;
}
print_r($seacrh);
?>
Answer the question
In order to leave comments, you need to log in
First, write down the referrers somewhere so that you can read them later. There is a suspicion that the information you need from there is no longer available.
Google out there encrypts the keys for sure, you can only see them through GA.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question