← Tutoriais

[PHP] Notificação quando GoogleBot visita o teu site!

Lida 9635 vezes

Offline

cenourinha 
Elite
Mensagens 4094 Gostos 21
Troféus totais: 34
Trófeus: (Ver todos)
Mobile User Apple User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4

Notificação quando GoogleBot visita o teu site!

Basta por este codigo no inicio do index.php para ser noticificado por e.mail sempre que o Google Bot visita o seu site!


Código: [Seleccione]
<?PHP
if(eregi("googlebot",$HTTP_USER_AGENT))
   {
   if ($QUERY_STRING != "")
      {$url = "http://".$SERVER_NAME.$PHP_SELF.'?'.$QUERY_STRING;}
   else
      {$url = "http://".$SERVER_NAME.$PHP_SELF;}
   $today = date("d M Y H:i");
   mail("teuemail@mail.com", "Googlebot entrou em http://$SERVER_NAME", "$today - Google visitou $url");
   }
?>



Não se esqueçam de mudar teuemail@mail.com pelo vosso e-mail!

Espero que gostem! Já uso isto à alguns meses!
Offline

Spread 
Membro
Mensagens 1433 Gostos 2
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

Já deves ter recebido uns hit's meus LOLOL

Cumps 8)
Offline

cenourinha 
Elite
Mensagens 4094 Gostos 21
Troféus totais: 34
Trófeus: (Ver todos)
Mobile User Apple User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4

Citação de: "Spread"
Já deves ter recebido uns hit's meus LOLOL

Cumps 8)


pk?
Offline

OFFICER 
Membro
Mensagens 2076 Gostos 0
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

Gostei! Em principio vou utilizar! :D
Offline

fpware 
Fundador
Mensagens 15318 Gostos 7
Troféus totais: 38
Trófeus: (Ver todos)
Linux User Mobile User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5

Muito bom! Obrigado Cenourinha!
Offline

Spread 
Membro
Mensagens 1433 Gostos 2
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

Citação de: "cenourinha"
Citação de: "Spread"
Já deves ter recebido uns hit's meus LOLOL

Cumps 8)


pk?
Porque por vezes ando 'mascarado' de googlebot.

Cumps 8)
Offline

kingless 
Membro
Mensagens 857 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2 Level 1

Citação de: "Spread"
Citação de: "cenourinha"
Citação de: "Spread"
Já deves ter recebido uns hit's meus LOLOL

Cumps 8)


pk?
Porque por vezes ando 'mascarado' de googlebot.

Cumps 8)


Por acaso o teu browser tem a mesma informação que o googlebot ?

 :lol:
Offline

Spread 
Membro
Mensagens 1433 Gostos 2
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

Citação de: "kingless"
Por acaso o teu browser tem a mesma informação que o googlebot ?

 :lol:
Por acaso tem, não sei é se é a mais recente pois já há muito que não actualizo.

Cumps 8)
Offline

kingless 
Membro
Mensagens 857 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2 Level 1

Achas ?

http://madenet.mine.nu/browser.php

Entra neste link e vais ver a informação do teu browser   :wink:
Offline

Spread 
Membro
Mensagens 1433 Gostos 2
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

E se não acreditas põe isso a escrever na tua db.


Cumps 8)

Ps-Editado para não estragar o layout do fórum.
Offline

kingless 
Membro
Mensagens 857 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2 Level 1

Yep ja escreveu  :lol:
Offline

Spread 
Membro
Mensagens 1433 Gostos 2
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

Não tem a ver com a informação do mozilla.




Cumps 8)
Offline

kingless 
Membro
Mensagens 857 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2 Level 1

Aquilo não estava a escrever a info do browser....

Entra de novo no site agora ja está a escrever..

http://madenet.mine.nu/browser.php

Não esqueças de colocar a informção do GoogleBot quero ver se aparece mesmo =)

 :wink:
Offline

kingless 
Membro
Mensagens 857 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2 Level 1

Agora apareceu confirmo!!  :lol:


82.155.251.160-Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2
82.154.214.176-Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2
217.129.18.23-Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
82.154.214.176-Opera/8.54 (Windows NT 5.1; U; pt)
82.154.214.176-Mozilla/5.0 (Windows NT 5.1; U; pt) Opera 8.54
82.154.214.176-Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; pt) Opera 8.54
82.154.214.176-Opera/8.54 (Windows NT 5.1; U; pt)
82.155.251.160-Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)

Ip e info dos browsers que entraram no site
Offline

OFFICER 
Membro
Mensagens 2076 Gostos 0
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

kingless, que code usas-te para ter as informações todas detalhadas do browser? :?