<div class="title_bot"><script>ec(2);</script></div> <br><br><span style="COLOR: #000000"></span><span style="COLOR: #000000">php<br></span><span style="COLOR: #0000ff">require_once</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">''</span><span style="COLOR: #000000">config.php</span><span style="COLOR: #000000">''</span><span style="COLOR: #000000">);<br></span><span style="COLOR: #0000ff">function</span><span style="COLOR: #000000"> counter()<br>{ <br> </span><span style="COLOR: #008080">session_start</span><span style="COLOR: #000000">();<br> </span><span style="COLOR: #800080">$sql</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">select counter from counter</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br> </span><span style="COLOR: #800080">$result</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">@</span><span style="COLOR: #008080">mysql_query</span><span style="COLOR: #000000">(</span><span style="COLOR: #800080">$sql</span><span style="COLOR: #000000">);<br> </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">!</span><span style="COLOR: #0000ff">empty</span><span style="COLOR: #000000">(</span><span style="COLOR: #800080">$result</span><span style="COLOR: #000000">))<br> {<br> </span><span style="COLOR: #800080">$row</span><span style="COLOR: #000000">=</span><span style="COLOR: #008080">mysql_fetch_array</span><span style="COLOR: #000000">(</span><span style="COLOR: #800080">$result</span><span style="COLOR: #000000">);<br> </span><span style="COLOR: #800080">$counter</span><span style="COLOR: #000000">=++</span><span style="COLOR: #800080">$row</span><span style="COLOR: #000000">[counter];<br> </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">!</span><span style="COLOR: #800080">$_SESSION</span><span style="COLOR: #000000">[</span><span style="COLOR: #000000">''</span><span style="COLOR: #000000">counter</span><span style="COLOR: #000000">''</span><span style="COLOR: #000000">])<br> {<br> </span><span style="COLOR: #800080">$query</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">update counter set counter=$counter</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br> </span><span style="COLOR: #800080">$result</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">@</span><span style="COLOR: #008080">mysql_query</span><span style="COLOR: #000000">(</span><span style="COLOR: #800080">$query</span><span style="COLOR: #000000">);<br> </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(</span><span style="COLOR: #800080">$result</span><span style="COLOR: #000000">)<br> {<br> </span><span style="COLOR: #800080">$_SESSION</span><span style="COLOR: #000000">[</span><span style="COLOR: #000000">''</span><span style="COLOR: #000000">counter</span><span style="COLOR: #000000">''</span><span style="COLOR: #000000">]</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">;<br> }<br> }<br> </span><span style="COLOR: #800080">$counter_len</span><span style="COLOR: #000000">=</span><span style="COLOR: #008080">strlen</span><span style="COLOR: #000000">(</span><span style="COLOR: #800080">$counter</span><span style="COLOR: #000000">);<br> </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(</span><span style="COLOR: #800080">$i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;</span><span style="COLOR: #800080">$i</span><span style="COLOR: #000000"><span style="COLOR: #800080">$counter_len</span><span style="COLOR: #000000">;</span><span style="COLOR: #800080">$i</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br> {<br> </span><span style="COLOR: #800080">$number</span><span style="COLOR: #000000">=</span><span style="COLOR: #008080">substr</span><span style="COLOR: #000000">(</span><span style="COLOR: #800080">$counter</span><span style="COLOR: #000000">,</span><span style="COLOR: #800080">$i</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">);<br> </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">isset</span><span style="COLOR: #000000">(</span><span style="COLOR: #800080">$number</span><span style="COLOR: #000000">))<br> {<br> </span><span style="COLOR: #0000ff">echo</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><img alt="php防刷计数器" ><span style="max-width:90%">"</span><span style="COLOR: #000000">.</span><span style="COLOR: #800080">$number</span><span style="COLOR: #000000">.</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">.gif''></span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br> }<br> }<br> }<br>}<br></span><span style="COLOR: #000000">?></span><span style="COLOR: #000000"> <br></span>www.cnjiaocheng.com<br><br><p id="TBPingURL"></p> <div class="kjy"></div></span></span>