Home > php教程 > php手册 > php 强制运行广告的代码

php 强制运行广告的代码

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-25 16:48:44
Original
882 people have browsed it

网站流量大但是访客就是不要点击!着让我们想赚钱的站长苦恼不以!但是在php中有这么一个很好的函数就是:session。思路是这样的:用session来保存每一个访问者的ip。

这样 访问一次后就不调广告了。这样就2全奇美了。不会乱跳广告。二又可以增加收入。

代码如下: 

 
<?php
session_start(); 
$lifeTime = 24 * 3600; 
session_set_cookie_params($lifeTime); 
$i = $_SESSION[&#39;vv&#39;]=$_SESSION[&#39;vv&#39;]+1;
if ($i < 2):?>
您的弹跳窗代码   
<?php endif; ?>
Copy after login

注意:必须要是弹跳窗的广告才能现实!


文章网址:

随意转载^^但请附上教程地址。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template