← Desenvolvimento

Geo-tracking - descobre a origem do teu visitante

Lida 21733 vezes

Offline

Tartaruga 
Membro
Mensagens 2908 Gostos 1
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

Eu sei que parece parvo, mas como é que eu coloco uma pop up no meu site? lolololol
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

Citação de: "Tartaruga"
tks


 :lol:  :lol:  :lol:
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

Citação de: "Tartaruga"
Eu sei que parece parvo, mas como é que eu coloco uma pop up no meu site? lolololol


Espera aí que eu já te ajudo:

http://javascript.internet.com/generators/popup-window.html

 :lol:  :lol:  :lol:
Offline

Tartaruga 
Membro
Mensagens 2908 Gostos 1
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

Thank you!

Resolvi adoptar a política do nando! Se o visitante não tiver bloqueador de pop up merece mesmo é levar com publicidade em cima! lolololololol
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

É a minha política :lol:
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

Offline

morpheus 
Membro
Mensagens 1199 Gostos 0
Troféus totais: 28
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1 1000 Posts

Talvez já sejam scripts a mais, mas eu acho este interessante.
Como eu gosto de usar umas pop-ups mas controladas (não gosto que o visitante seja obrigado a comer com 10 pop-ups se for ao site 10 vezes) uso este script que limita o nº de pop-ups.

Só é necessário editar as 2 primeiras linhas. O resto fica sempre igual.

Pop up, 1 vez por user a cada 24 horas:

Código: [Seleccione]
<script LANGUAGE="JavaScript">
var expDays = 1; // quantos dias de duração?
var page = "xxx_O_LINK_AQUI_xxx";
var windowprops = ""; //var. para o URL (em branco para nenhuma

function GetCookie (name) {  
var arg = name + "=";  
var alen = arg.length;  
var clen = document.cookie.length;  
var i = 0;  
while (i < clen) {    
var j = i + alen;    
if (document.cookie.substring(i, j) == arg)      
return getCookieVal (j);    
i = document.cookie.indexOf(" ", i) + 1;    
if (i == 0) break;  
}  
return null;
}
function SetCookie (name, value) {  
var argv = SetCookie.arguments;  
var argc = SetCookie.arguments.length;  
var expires = (argc > 2) ? argv[2] : null;  
var path = (argc > 3) ? argv[3] : null;  
var domain = (argc > 4) ? argv[4] : null;  
var secure = (argc > 5) ? argv[5] : false;  
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +  
((domain == null) ? "" : ("; domain=" + domain)) +    
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {  
var exp = new Date();  
exp.setTime (exp.getTime() - 1);  
var cval = GetCookie (name);  
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
   }
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function checkCount() {
var count = GetCookie('count');
if (count == null) {
count=1;
SetCookie('count', count, exp);

window.open(page, "", windowprops);

}
else {
count++;
SetCookie('count', count, exp);
   }
}
</script>
Offline

Freedoom 
Membro
Mensagens 723 Gostos 0
Troféus totais: 28
Trófeus: (Ver todos)
Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2

morpheus esse javascript nao da para configurar por horas em vez de dias?
Offline

morpheus 
Membro
Mensagens 1199 Gostos 0
Troféus totais: 28
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1 1000 Posts

yap

na linha
Código: [Seleccione]
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

tira-se o
Citar
24*


assim, a linha que era de dias, passa a ser de horas. 8)
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

Sempre atento morpheus! :D
Offline

Freedoom 
Membro
Mensagens 723 Gostos 0
Troféus totais: 28
Trófeus: (Ver todos)
Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2

tks morpheus
ver se faço um teste a isso amanha :P
Offline

Tartaruga 
Membro
Mensagens 2908 Gostos 1
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

Brutal!!!!!

Obrigado!!!
Offline

GTO_KAI 
Membro
Mensagens 532 Gostos 13
Troféus totais: 31
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter Poll Voter Poll Starter Level 5 Level 4 Level 3

hehe eu tinha um popup que não sei pq ele direicionava pro site que eu queria normalmente mais só mostrava um pedacinho do site correspondente ao tamanho do popup mais esse pegou do jeito que eu queria!!!!+
Offline

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

Algum de vocês tem a penultima versão da base de dados do ip2nation?

a ultima versão que saiu no dia 29 maio da-me um erro...

Se alguem me poder ajudar agradecia.
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

Por acaso não a tenho...

Que tipo de erro é que te está a dar?