hai2ukri Posted June 22, 2009 Report Posted June 22, 2009 Sveiki, Kā varētu panākt, lai tiek noteikts lietotāja IP un ārzemnieki tiktu redirektēti uz citu lapu? Quote
marcis Posted June 22, 2009 Report Posted June 22, 2009 Ja klienta IP nav šī saraksta ietvaros (range), tad viņš nav no Latvijas un attiecīgi var tikt mests prom. Quote
hai2ukri Posted June 23, 2009 Author Report Posted June 23, 2009 J0ke, man Tavs skripts neiet. Izvada tikai "Only for citezens of Latvia! 52.35.235.24 Welcome! 159.148.60.2". Ja izdzēš test rindiņas, tad nekas nenotiek :( Quote
hai2ukri Posted June 23, 2009 Author Report Posted June 23, 2009 Bet rekur jau tas ir # if (!$islv) { echo 'Only for citezens of Latvia! ' . $ip . '<br />'; } # else { echo 'Welcome! ' . $ip . '<br />'; } Cik es saprotu, tad skriptam būtu jāizvada "Welcome" un mans IP vai ne? Quote
J0ke Posted June 23, 2009 Report Posted June 23, 2009 Tev tas "savs ip" vēl tur jāiebaro :D Skripts tik pārbauda nevis izzīlē kādu ir jāpārbauda... Quote
AndrisAndris Posted September 8, 2009 Report Posted September 8, 2009 Paldies cuuu, marcis, bubu, J0ke un php.lv! Atradu, ko meklēju. Quote
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.