injuste Posted April 21, 2012 Share Posted April 21, 2012 Beyler şimdi benim bir uygulamam var 2 sayfadan oluşuyor "Page1" ve "Page2" ilk sayfada bir buton var ve bu butona basılınca sunucudaki .txt dosyasının varlığını test edip ona göre ikinci sayfaya geçiyor.Fakat sorun burda başlıyor .txt dosyasını indirmeyemi çalışıyor bilemiyeceğim fakat program bir anda kasıyor ve bekliyor eğer bu süre zarfında dosyayı indiriyorsa kotalı arkadaşlar ne yapacak fakat benimde o dosyayı test ettirmem lazım yoksa işler karışır.Yardım edin beyler [code]connected = HTTP.TestConnection("http://**********/****.txt", 20, 80, nil, nil); if connected then Page.Navigate(PAGE_NEXT); else Dialog.Message("Hata", "İnternet erişiminizde bir problem var."); end[/code] Quote Link to comment Share on other sites More sharing options...
OzgrGvnc Posted April 21, 2012 Share Posted April 21, 2012 Sunucudaki .txt dosyası nekadar büyük olabilir ki kotalı arkadaşlara zararı dokunsun? Ams projelerinde (genelde) internetten veri çektiğinde kasılma olur. Sunucunun kalitesine de bağlı.. Birde neden test connection kullanıp txt yolu gösterdiğini anlayamadım. Direk adres yazabilirdin. Quote Link to comment Share on other sites More sharing options...
injuste Posted April 21, 2012 Author Share Posted April 21, 2012 [quote name='OzgrGvnc' date='21 April 2012 - 09:31 ' timestamp='1334993516' post='1189854'] Sunucudaki .txt dosyası nekadar büyük olabilir ki kotalı arkadaşlara zararı dokunsun? Ams projelerinde (genelde) internetten veri çektiğinde kasılma olur. Sunucunun kalitesine de bağlı.. Birde neden test connection kullanıp txt yolu gösterdiğini anlayamadım. Direk adres yazabilirdin. [/quote] Öncelikle ".txt" dosyası 5-6 mb ve page2'de IExplorer plugini üzerinden gösterim yapıyorum yani dosya yerinde olmazsa veya bağlanamazsa hata versinki işler karışmasın. Quote Link to comment Share on other sites More sharing options...
OzgrGvnc Posted April 21, 2012 Share Posted April 21, 2012 5 - 6MB txt dosyası okutuyorsan kasması normal değilmi sencede? Önce dosyayı indiriyor. Quote Link to comment Share on other sites More sharing options...
injuste Posted April 21, 2012 Author Share Posted April 21, 2012 [quote name='OzgrGvnc' date='21 April 2012 - 09:56 ' timestamp='1334995010' post='1189864'] 5 - 6MB txt dosyası okutuyorsan kasması normal değilmi sencede? Önce dosyayı indiriyor. [/quote] Test ederken indirmiş oluyormu bilmiyorum ama IExplorer'da navigate ile gösterim yapıyorum yani indirerek değil. Quote Link to comment Share on other sites More sharing options...
KintaRo Posted April 21, 2012 Share Posted April 21, 2012 bir siteye girdiğinizde o sitedeki metin, grafik yani sayfayı bilgisayarınıza indiripte gösteriyor. txt olması birşeyi değiştirmez bilgisayarına indirmeden nasıl gösterecek? özgür Quote Link to comment Share on other sites More sharing options...
injuste Posted April 21, 2012 Author Share Posted April 21, 2012 Peki diyelim test işini bırakalım direk geçsin 2. sayfaya ve siteyi göstersin IExplorer diyelim site yüklenemiyecek yada internet yok Web sayfası görüntülenemiyor yerine başka birşey yapabilir miyiz? Quote Link to comment Share on other sites More sharing options...
KintaRo Posted April 21, 2012 Share Posted April 21, 2012 internet yoksa http.testconnection ile google.com u test ettir. Quote Link to comment Share on other sites More sharing options...
oyuncudragon Posted May 8, 2012 Share Posted May 8, 2012 (edited) [codebox]connected = HTTP.GetFileSize("http://**********/****.txt", MODE_BINARY, 3, 80, nil, nil, nil); if connected ~= -1 then[/codebox] böyle yaparsan daha hızlı biçimde linki kontrol eder. eğer dosya yoksa -1 olarak geri döner. umarım yardımcı olmuşumdur. Edited May 8, 2012 by oyuncudragon 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.
Note: Your post will require moderator approval before it will be visible.