Vidi se prilikom prvog klika prosto iz razloga sto sessija ne zna da li browser klijenta ima cookies enabled ili ne, pa salje session_id preko GET-a.
Ako vec ne mozes da se resis toga, primeni jedan prost workaround. Uhvati user agent klijenta i ako je neki bot, preskoci session_start() deo. Evo primera:
Code:
$agent = $_SERVER["HTTP_USER_AGENT"];
$botFlag = 0;
$bots = array("Googlebot\/2\.1", "Google\/2\.1", "msnbot\/0\.11");
foreach($bots as $bot)
{
if (preg_match("/$bot/", $agent))
{
$botFlag = 1;
}
}
if (!$botFlag)
{
session_start();
}
Jeff, one day you’ll understand that it’s harder to be kind than clever.