新UI八字测算/起名/灵签测算风水占卜文章自适应引流系统源码

今天分享的是全新的二开版本免费测算引流程序,前端自适应手机端!
自用起权重的引流网站源码,我的站没有搭建付费测算,对接的是cps系统变现,这款程序起权重很好用的,客户有权重3-5的案例站,自行搜索哈!
二开版本增加了自动导入txt+自动配图的功能,配的图片是背景图+标题水印的形式

    public function index() {
		$cate_id = I('cid');		
		if(!$cate_id){
		$this->ajaxReturn(0, 'cid is empty!');		
		}
		$author  = C('ftx_ai_author');	
		$status  = C('ftx_ai_status');
		$cidd = array(4,5,6,23);
		$x = rand(0,3);
		$cate_id = $cidd[$x];
		$upload_path = C('ftx_attach_path') . 'txt/'. $cate_id .'/';				
		$filename = scandir($upload_path);
		for($i=2;$i<count($filename);$i++){
		 $filelist[] =  $filename[$i];		 		 
	    }
		$totalnum = count($filelist);
		if($totalnum){
		$xfile = $filelist[rand(0,$totalnum-1)];
		$title =  mb_convert_encoding($xfile,'UTF-8','auto');
		$title = str_replace(".txt","", $title); 
		$where['title'] = $title;		
		$file = $upload_path.$xfile;		
		if(D('share')->where($where)->find()){
		unlink($file);		
		$this->ajaxReturn(99, '文档标题重复已删除');
		}
		if($cate_id){
		$cinfo = D('share_cate')->where(array('id'=>$cate_id))->find();
		if($cinfo['name']){	
        $cpath = $cinfo['id'];
        }else{
        $cpath = "pic";	
        }	
        $path = "data/upload/article/".$cpath."/";	
        $newname = md5($title);	
	//	if($cinfo['peitu']){        
        if(is_file($path.$newname.'.jpg')){                                		
        $newimg = C('ftx_site_url').$path.$newname.'.jpg';		
        }else{			
		$newimg = $this->doimg($cpath,$title);			
		}
       if(is_file($path.$newname.'.jpg')){
$arr =  $this->read($file);
/*这个循环是内容数组加上图片*/
for($i=0;$i<count($arr);$i++){
	if($i==0){
	$arr[$i] = '<p><center><img src="'.$newimg.'" alt="'.$title.'"></center></p>'.$arr[$i];
	}
	$infoss .= $arr[$i];
	}
$infod = $infoss;	
       }
		}	
		preg_match("<img.*src=[\"](.*?)[\"].*?>", $infod, $match);
		$item['mpic'] = $match[1];
		$item['desc'] = utf_substr($infod,220);
		//$item['mid'] = substr(md5(md5($title)),8,16);
		$item['cate_id'] = $cate_id;	
		$item['title'] = $title;
		$item['author'] = $author;		
		$item['add_time'] = time();
		$item['status'] = 1;	
		$item['info'] = $infod;
	//	$item['fabu'] = 1;			
		if($item['cate_id'] && $item['title'] && $item['info']){			
		$res = D('share')->add($item);
		if($res){
		unlink($file);		
		$this->ajaxReturn(100, 'OK');	
		}else{
		$this->ajaxReturn(101, 'error');	
		}
		}else{
		$this->ajaxReturn(102, 'error');		
		}			
		}else{
		$this->ajaxReturn(103, 'over');	
		}
    }
	public function doimg($cpath,$title){	
		    $con = "data/upload/peitu/pic/";
		   // $con = "data/upload/peitu/".$cpath."/";
		    $imgname = scandir($con);
		    for($y=2;$y<count($imgname);$y++){
                $conname[] = $imgname[$y];
		    }
		    if(count($conname)){
                $num = count($conname)-1;
                $pi = rand(0,$num);
                $img = $conname[$pi];
                //$src = C('ftx_site_url').$con.$img;	
                $src = $con.$img;
                $path = "data/upload/article/".$cpath."/";		
                $this->make_dir($path);
                $newname = md5($title);	
                $size = 27;//字体大小
                $bg = 0;//文字背景色,格式如:#FFFFFF 0则随机
                $bgh = 0;//文字背景高度  0自适应
                $opacity = 66;//背景透明度 数字越小透明度越高 0表示完全透明
                $alpha = 0;//文字透明度 数字越小透明度越小 0表示不透明
                $textcolor = "#FFFFFF";//文字颜色格式如:#FFFFFF,空则随机色
                $font = 0;//字体文件名称,保存于app/Lib/ORG
                $type = 'jpg';//生成图片格式 jpg或png
                $mod = 2;//1直接输出;2保存本地
Image::image_hp($src,$title,$path,$newname,$size,$bg,$bgh,$opacity,$alpha,$textcolor,$font,$type,$mod);	
                //$newimg = C('ftx_site_url').$path.$newname.'.'.$type;	
                $newimg = '/'.$path.$newname.'.'.$type;	
				return $newimg;
			}	
	}
    public function make_dir($path)
    {
        if (!file_exists($path)) {
            $mk = @mkdir($path, 0777, true);
            @chmod($path, 0777, true);
        }
        return true;
    }

程序栏目包括:

名字打分

风水知识

八字测算

吉凶查询(包括各种数字吉凶查询)

在线求签(多种灵签在线测算)

周公解梦

老黄历

十二星座

生肖运势

程序截图展示:
首页截图显示分类文章和免费测算入口
分类文章页
调用数据库的黄历页面
在这里插入图片描述
在这里插入图片描述
搭建教程在程序包内!
搭建说明
1、Php5.5或者 php5.6+mysql+nginx搭建环境
2、把www压缩包放到根目录解压
3、把数据库.sql.gz导入数据库
4、修改数据库链接文件:data/config/db.php里你的数据库链接信息
5、后台地址:http://你的域名/admin.php
账号admin
密码admin
6、后台系统设置,站点设置,修改网站域名
各个页面的seo标题描述信息在:系统设置->seo设置->页面seo里面设置
可以导入txt文件,自动配图
功能说明:
1、txt文档上传到 data/upload/txt/{分类id}文件夹,一篇文章一个文件,文件名称就是文章标题;
2、可自行刷新导入或者使用宝塔面板中的定时访问:http://x20.chinabic.com/?m=caiji&cid=666 定时1分钟就是1分钟导入一篇的意思。
3、这个链接是自动随机从你放txt的文件夹中抽取txt导入相应的分类,比如 data/upload/txt/23/文件夹下的文章自动导入到十二生肖栏目下。
后台自动导入txt文章插件

百度搜索:奥顺运营资源网获取
下载:https://pan.baidu.com/s/1UMG19Sh4_mjDVqIitsN6wA?pwd=6655

其他远程程序推荐

S22择日老黄历网带免登录发布文章模块
S20黄历网站源码带文章系统带免登录发布模块
S2黄道吉日查询网源码开源带数据黄历
S19测算引流文章系统带火车头免登录发布
S13仿农历网源码
S16节日倒计时网源码
S17宝宝起名网带文章系统源码
S7诗词起名网引流程序
S5粉红色UI老黄历日历网程序
S3棕色UI老黄历网程序源码
S15灵签网源码
S18周公解梦网源码
测算起名工具网源码

  • 7
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值