[ create a new paste ] login | about

Link: http://codepad.org/TeFzRCnP    [ raw code | output | fork | 2 comments ]

Aleks - PHP, pasted on Jul 25:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
/// Функция счётчика с защитой от обновления страницы
function counter()
 { if (!isset($_COOKIE['visited']))
    {
     $EXPIRE_DATE = 86400; //Сутки
     setcookie('visited', 1, time()+$EXPIRE_DATE , '/');
     return '<!--noindex--><img src="http://count.wood.ru/?skin=art_l&www=1&index=1&case=1&hits=1&num=5" alt="[[Read an entry]]" title="[[Read an entry]]"><!--/noindex-->';
    }
     else
    {
     return '<!--noindex--><img src="http://count.wood.ru/?skin=art_l&www=1&index=1&case=1&hits=1&num=5&nocount=1" alt="[[Read an entry]]" title="[[Read an entry]]"><!--/noindex-->';
    }
 
 }

echo counter();

?>


Output:
1
<!--noindex--><img src="http://count.wood.ru/?skin=art_l&www=1&index=1&case=1&hits=1&num=5" alt="[[Read an entry]]" title="[[Read an entry]]"><!--/noindex-->


Create a new paste based on this one


Comments:
posted by Aleks on Jul 25
[[Read an entry]] заменить на нужный текст.
reply
posted by Aleks on Jul 25
Все виды счётчиков и дополнительные настройки можно посмотреть на сайте http://count.wood.ru/info/

reply