[supersaibal]
Originariamente inviato da Ricky78
Mah... credo di no, in quanto proponi dei contenuti sempre aggiornati e a tema con il contenuto (credo) del sito. Questi contenuti poi come vengono "messi" nella pagina?
vengono (anzi verranno perché non ho ancora scritto il codice)proposti i contenuti oggetto di indicizzazione, ritrovati con una ricerca fulltext al posto dei contenuti aggiornati.
sto scrivendo il codice proprio ora ...
Codice PHP:
function searchReferrer($str_ref, $str_src, $str_tok, $str_key)
{
if (strpos('-'.$str_ref, $str_src) > 0)
{
if (substr($str_key, 0, strlen($str_tok)) == $str_tok)
{
return substr($str_key, strlen($str_tok)) ;
}
}
return '';
}
if (isset($_SERVER['HTTP_REFERER']))
{
$tmpreffer = trim(htmlspecialchars(addslashes($_SERVER['HTTP_REFERER'])));
$tmpreffer = strtolower($tmpreffer); $queryPos = strpos($tmpreffer, '?');
$tmpreffer = str_replace('?', "&", $tmpreffer);
$tmpreffer = str_replace('&', '&', $tmpreffer);
$queryArg = explode('&', substr($tmpreffer, $queryPos + 1));
reset($queryArg);
$ag_search = '';
while (list(, $chiave) = each($queryArg))
{
$ag_search .= searchReferrer($tmpreffer, 'google.', 'q=', $chiave) ;
$ag_search .= searchReferrer($tmpreffer, 'arianna.libero.', 'query=', $chiave) ;
$ag_search .= searchReferrer($tmpreffer, 'search.msn.', 'q=', $chiave) ;
$ag_search .= searchReferrer($tmpreffer, 'search.virgilio.', 'qs=', $chiave) ;
}
echo $ag_search;
}