alucard Posted June 26, 2015 Share Posted June 26, 2015 Merhaba ; uygulamalarda IP yasaklaya-biliyoruz. ama ben şöyle bir şey yapmak istiyorum. Sadece İzin verdiğim IP adreslerinde uygulamanın çalışmasını istiyorum. belirlediğim adreslerin dışında erişimi engellemek istiyorum. Böyle bir özellik mevcut mu acaba. Eğer mevcut değilse mutlaka eklenmeli. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 26, 2015 Administrators Share Posted June 26, 2015 Login ekranında gelen IP adresini kontrol edin. Adres geçerli değilse o zaman login işlemine izin vermeyin. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 26, 2015 Share Posted June 26, 2015 Merhaba Try: http://forums.unigui.com/index.php?/topic/3220-allowediplist/&do=findComment&comment=16541 Best regards! Quote Link to comment Share on other sites More sharing options...
alucard Posted June 26, 2015 Author Share Posted June 26, 2015 Login ekranında gelen IP adresini kontrol edin. Adres geçerli değilse o zaman login işlemine izin vermeyin. ip adresini nasıl alacağız peki Quote Link to comment Share on other sites More sharing options...
bugra Posted June 26, 2015 Share Posted June 26, 2015 RemoteAddress := UniSession.RemoteHost ; if RemoteAddress <> '111.111.111.111' then begin UniSession.Terminate(RemoteAddress + ' is not allowed...'); end; Bu kodu formun onCreate eventine ekleyip çalıştırırsanız ip adresi 111.111.111.111'den farklı makineler giremeyecektir. Burada UniSession.RemoteHost client ip adresini verir. bu adresi server üzerinde tuttuğunuz bir veritabanına kaydedip üstteki kodda ufak birkaç değişiklik yaparak veritabanına aktardığınız ipleri engelleyebilirsiniz ya da tam tersi izin verebilirsiniz. Quote Link to comment Share on other sites More sharing options...
alucard Posted June 29, 2015 Author Share Posted June 29, 2015 Artık aşağıdaki kod bloğunu kullanarak WhiteIpList oluşturabilirsiniz. Vt ye girilen IP adresleri haricinde programa giriş engellenmiş oluyor. ekte de tablo yapısı bulunmaktadır. procedure TMainForm.UniFormCreate(Sender: TObject); var IpAdres : string; begin IpAdres := UniSession.RemoteHost ; ADOTIPAdresleri.Close; ADOTIPAdresleri.Filter := 'IPAdresi = '+IpAdres; ADOTIPAdresleri.Filtered := True; ADOTIPAdresleri.Open; if ADOTIPAdresleri.RecordCount = 1 then begin // ShowMessage('IP Adresleri : '+ADOTIPAdresleriIPAdresi.AsString) end else begin // ShowMessage('Bu Adresin Giriş İzni Yok : '+IpAdres); UniSession.Terminate('Bu Adresin Giriş İzni Yok : '+IpAdres); end; end; 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.