Lynx Posted November 22, 2004 Report Share 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? Link to comment Share on other sites More sharing options...
rumpels Posted November 22, 2004 Report Share 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. Link to comment Share on other sites More sharing options...
raivis Posted November 23, 2004 Report Share 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 Link to comment Share on other sites More sharing options...
raivis Posted November 25, 2004 Report Share Posted November 25, 2004 unknow uzrādīs, ja lietotājs lapā ieies caur proxy Link to comment Share on other sites More sharing options...
bubu Posted November 25, 2004 Report Share 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 Link to comment Share on other sites More sharing options...
Lynx Posted November 27, 2004 Author Report Share Posted November 27, 2004 Liels paldies par palidzibu, uztaisiju ko man vajadzeja. Link to comment Share on other sites More sharing options...
bubu Posted November 28, 2004 Report Share 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 Link to comment Share on other sites More sharing options...
lazda144 Posted January 2, 2008 Report Share 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 Link to comment Share on other sites More sharing options...
bubu Posted January 2, 2008 Report Share Posted January 2, 2008 Sintaktiska kļūda 18 rindiņā (vai 17-tajā). Link to comment Share on other sites More sharing options...
Recommended Posts