Bir PHP tabanlı web sayfası Reklamlar

3 Cevap

We all have come across web pages which take some time to show the content the user is waiting for and in the mean time display ads on the page.

I'm not talking about the pages that show full-page ad with 'skip this ad' button.

A typical example of what I'm referring to is: I visit a free plugin site. Click on the plugin I want to download it opens a new page which has the link to the plugin zip file. But the link does not appear immediately. When the page is loaded it is full of ads with other misleading (:P) download links. The actual link I'm interested in appears after say some 5 seconds, squeezed between two ads.

Bu nasıl bir PHP tabanlı web sitesi için neler yapılabilir? Basit bir uyku () veya usleep () yapacak?

3 Cevap

Hayır.

Eğer bir sunucu tarafı dilde bir uyku () veya usleep () (PHP) kesilirken uyku çıkış kullanıcıya gönderilen tipik önce, sunucu tarafında oluşur.

Eğer Javascript ve setTimeout () işlevini kullanarak arzu işlevselliğini uygulamak gerekir.

Bir div olarak bağlantı var ve başlangıçta gizlemek ve bir Javascript timer bunu göstermeye başlayabilirsiniz.

Aradığınız ne benzer bir şey.

Something is hidden
<div id="hid" style="visibility: hidden">TADA!</div>
here
<script type="text/javascript">
function showIt() {
  document.getElementById("hid").style.visibility = "visible";
}
setTimeout("showIt()", 1000); // after 1 sec
</script>

Source

Bir setTimeout() bir <div> zaman bir miktar sonra görünür bağlantısını içeren yapmak javascript.