← Desenvolvimento

Saber o isp

Lida 1246 vezes

Offline

Bruno Mota 
Membro
Mensagens 1733 Gostos 3
Troféus totais: 28
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

alguem sabe como posso saber qual é o ISP do visitante?
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

Existem varias forma de se saber o ISP do visitante, mas a forma que eu criei para colocar na minha sig foi essa:

Código: [Seleccione]

$isp = gethostbyaddr($_SERVER['REMOTE_ADDR']);
preg_match("/[[a-z0-9\-_]+]?\.?[a-z]+$/i", $isp, $ispd);
if(!empty($ispd)) $isp1 = $ispd[0];
else $isp1 = "Desconhecido";
echo $isp1;
Offline

Bruno Mota 
Membro
Mensagens 1733 Gostos 3
Troféus totais: 28
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

kingless, obrigado pela ajuda