gunmetal Posted February 12, 2011 Report Share Posted February 12, 2011 Sveiki es izlasīju sadaļu http://php.lv/f/topic/1712-valsts-noteikshana/ Bet man šis kods nedarbojas, kāpēc tā? "Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in C:\AppServ\www\ip2country.php on line 18" Un vai ir cits kods kā noteikt valsti? Quote Link to comment Share on other sites More sharing options...
labaiss Posted February 12, 2011 Report Share Posted February 12, 2011 please use search: http://php.lv/f/topic/17689-valsts-noteiksana-pec-ip-adreses-optimizeta-pieeja/page__p__138303__hl__%2Bvalsts+%2Bnoteik%C5%A1ana__fromsearch__1#entry138303 http://php.lv/f/topic/17678-ko-jus-sakat-par-sadu-lietu/page__p__138297__hl__%2Bvalsts+%2Bnoteik%C5%A1ana__fromsearch__1#entry138297 http://php.lv/f/topic/17274-valsts-noteiksana-pec-ip/page__p__135195__hl__%2Bvalsts+%2Bnoteik%C5%A1ana__fromsearch__1#entry135195 Quote Link to comment Share on other sites More sharing options...
Rincewind Posted February 12, 2011 Report Share Posted February 12, 2011 18 rinda: cfunction getctrybycode($code) { Tiešām nekas te nemulsina? Quote Link to comment Share on other sites More sharing options...
gunmetal Posted February 12, 2011 Author Report Share Posted February 12, 2011 nē Quote Link to comment Share on other sites More sharing options...
gunmetal Posted February 12, 2011 Author Report Share Posted February 12, 2011 Ja kāds zin kodu kā noteikt lai lietotājs ir vai nav no latvijas Lūdzu pasakiet, jo mani neinteresē citas valstis. Quote Link to comment Share on other sites More sharing options...
labaiss Posted February 12, 2011 Report Share Posted February 12, 2011 (edited) izvēlies kādu no ip noteikšanas funkcijām. - padod IP $valsts_kods = ip2country($IP); if ($valsts_kods == "LV") { echo "Tā ir latvija"; } else { echo "Tā nav latvija"; } Edited February 12, 2011 by labaiss Quote Link to comment Share on other sites More sharing options...
gunmetal Posted February 12, 2011 Author Report Share Posted February 12, 2011 Nu tieši man vajag noteikšanas funkciju. Quote Link to comment Share on other sites More sharing options...
daGrevis Posted February 12, 2011 Report Share Posted February 12, 2011 18 rinda: cfunction getctrybycode($code) { Tiešām nekas te nemulsina? nē cfunction => function. *nopūšas* Quote Link to comment Share on other sites More sharing options...
marrtins Posted February 12, 2011 Report Share Posted February 12, 2011 Reku būs: http://php.lv/f/topic/17274-valsts-noteiksana-pec-ip/page__view__findpost__p__135203 Quote Link to comment Share on other sites More sharing options...
gunmetal Posted February 12, 2011 Author Report Share Posted February 12, 2011 paldies marrtins nebiju iedomājies par šito. Tnq Quote Link to comment Share on other sites More sharing options...
Kemito Posted February 12, 2011 Report Share Posted February 12, 2011 Līki pirksti atkal powa :D nelieto notepad++ kad neredzi kur kļūda kodā? Quote Link to comment Share on other sites More sharing options...
Rincewind Posted February 12, 2011 Report Share Posted February 12, 2011 nelieto notepad++ kad neredzi kur kļūda kodā? Kas tad nu? Nav ne vainas notepad++! :) Quote Link to comment Share on other sites More sharing options...
briedis Posted February 12, 2011 Report Share Posted February 12, 2011 Mhm, un notepad++ dēļ rodas šādi posti. Quote Link to comment Share on other sites More sharing options...
daGrevis Posted February 12, 2011 Report Share Posted February 12, 2011 Man tādu postu nav. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.