Lynx Posted November 22, 2004 Report Posted November 22, 2004 Tatad, ir nepiecieshamiba uztaisit skriptu, kas nosaka apmekletaja valsti. Vispar pietiktu ja izskirtu apmekletajus no Latvijas. Itka ir ideja noteikt ip adresi un pec tam salidzinat ar Latvijas ip adresem no xxx.xxx.xxx.xxx - xxx.xxx.xxx.xxx Tapec rodas 2 jautajumi kada intervala ir Latvijas ip adreses? Un kaa uztaisit skriptu kas salidzina adreses shaja intervala?
rumpels Posted November 22, 2004 Report Posted November 22, 2004 saraksts sheit http://www.nic.lv/local.net ar intervala metodi, vislabak jau lobit no shi faila un vienmer bus svaigucis. vieglak butu ja db iedampoti dati. ka redzams var pat ips noteikt tiesho un tad jau piemeram ja nepatik delfisti nelaist ieksha.
raivis Posted November 23, 2004 Report Posted November 23, 2004 Arī mani agrāk tas ļoti, ļoti ieinteresēja> pēc apmeklētāja IP adresses noteikt lietotāja Pilsētu utt. Ceru, ka ar šo tev būšu atbildējis: <?php ############################### # http://raivis.tk # # filename: Location.php # ############################### require("ip2country.php"); #http://paste.php.lv/1415 // print "Client IP: ".$myCliInf->getClientIP()."<br>"; // print "Client Hostname: ".$myCliInf->getClientHostname()."<br>"; // print "Client Country: ".$myCliInf->getClientCountry()."<br>"; // print "Client Flag: ".$myCliInf->getClientFlag(SMALL)."<br>"; // print "Client Flag: ".$myCliInf->getClientFlagHTML(SMALL)."<br>"; # try with SMALL or BIG to change the size of the flag</a> $myCliInf = new ClientInfo; if ($myCliInf->getClientCountry()) { print "You are from <b>".$myCliInf->getClientCountry()."</b>."; } else { print "unknow"; } ?> ip2country.php countries.txt
raivis Posted November 25, 2004 Report Posted November 25, 2004 unknow uzrādīs, ja lietotājs lapā ieies caur proxy
bubu Posted November 25, 2004 Report Posted November 25, 2004 (edited) Heh, tu jau centies IP nomapot uz hostname, ne? Bet ne visām ip tak atbilst hosteims, pareiz? Un vai tik cfunction nav novecojis keywords, ne? ;) Edited November 25, 2004 by bubu
Lynx Posted November 27, 2004 Author Report Posted November 27, 2004 Liels paldies par palidzibu, uztaisiju ko man vajadzeja.
bubu Posted November 28, 2004 Report Posted November 28, 2004 Iesaku paskatīties šo: http://ip-to-country.webhosting.info/node/...0c5299c3cf9185b un http://ip-to-country.webhosting.info/node/view/54 un http://ip-to-country.webhosting.info/node/view/118
lazda144 Posted January 2, 2008 Report Posted January 2, 2008 (edited) kaapeec man izmet šaadu?? Parse error: parse error, unexpected T_STRING, expecting T_FUNCTION in R:\AppServ\www\ip2country.php on line 18 Edited January 2, 2008 by lazda144
bubu Posted January 2, 2008 Report Posted January 2, 2008 Sintaktiska kļūda 18 rindiņā (vai 17-tajā).
Recommended Posts