Пример #1
0
<?php

ignore_user_abort();
//关掉浏览器,PHP脚本也可以继续执行.
set_time_limit(0);
//让程序无限制的执行下去
include "../config/mysql_config.php";
include '../funclass/YBClass.php';
$YIBAN = new YBClass();
$sql = "select * from ybuser where run='1' ";
$re0 = $mysqli->query($sql);
if ($re0) {
    if ($re0->num_rows >= 1) {
        $h = date("H");
        while ($row2 = $re0->fetch_array()) {
            if ($row2['runtime1'] <= $h && $row2['runtime2'] >= $h || $row2['runtime1'] == $row2['runtime2'] && $row2['runtime1'] == 0) {
                //在运行时间内的
                if ($row2['state'] == 1) {
                    //上次正常运行的
                    if (date("Y-m-d") != date("Y-m-d", $row2['updatefrendstime'] == '' ? time() / 2 : $row2['updatefrendstime'])) {
                        //今天未签到
                        $json = $YIBAN->getLogin($row2['ybuser']);
                        if (is_array($json) && $json['code'] == 200 && array_key_exists('isLogin', $json['data']) && $json['data']['isLogin'] == 1) {
                            //检测登录状态成功
                            $frends = $YIBAN->getFrends($row2['ybuser'], 1);
                            $myfrends = getMyTrends($mysqli, $row2['ybuser']);
                            $frendInfo = getFrendsInfo($frends, $myfrends);
                            print_r($frends);
                            $sql = "insert into ybfrends (ybid,ybname,myybid,myybuser)value";
                            $sql_arr = array();
                            foreach ($frendInfo[0] as $key => $value) {
Пример #2
0
<?php

ignore_user_abort();
//关掉浏览器,PHP脚本也可以继续执行.
set_time_limit(0);
//让程序无限制的执行下去
include "../config/mysql_config.php";
include '../funclass/YBClass.php';
$YIBAN = new YBClass();
$sql = "select * from ybuser where run='1'";
$re0 = $mysqli->query($sql);
$gH = 1 * mt_rand(1, 3);
//运行间隔
if ($re0) {
    if ($re0->num_rows >= 1) {
        $h = date("H");
        while ($row2 = $re0->fetch_array()) {
            // print_r($row2);
            if ($row2['runtime1'] <= $h && $row2['runtime2'] >= $h || $row2['runtime1'] == $row2['runtime2'] && $row2['runtime1'] == 0) {
                //在运行时间内的
                $now = time();
                $upH = round(($now - $row2['zantongtime']) / 3600);
                //获得两个时间的间隔(小时)
                // echo $upH;
                if ($row2['state'] == 1 && $row2['runzantong'] == 1 && $upH >= $gH) {
                    //上次正常运行的,且开启博文功能,超过10个小时则运行一次
                    $json = $YIBAN->getLogin($row2['ybuser']);
                    // echo __LINE__.'.';
                    if (is_array($json) && $json['code'] == 200 && array_key_exists('isLogin', $json['data']) && $json['data']['isLogin'] == 1) {
                        //检测登录状态成功
                        echo 'run;';
Пример #3
0
<?php

ignore_user_abort();
//关掉浏览器,PHP脚本也可以继续执行.
set_time_limit(0);
//让程序无限制的执行下去
include "../config/mysql_config.php";
include '../funclass/YBClass.php';
$YIBAN = new YBClass();
$sql = "select * from ybuser where run='1' ";
$re0 = $mysqli->query($sql);
if ($re0) {
    if ($re0->num_rows >= 1) {
        $h = date("H");
        while ($row2 = $re0->fetch_array()) {
            if ($row2['runtime1'] <= $h && $row2['runtime2'] >= $h || $row2['runtime1'] == $row2['runtime2'] && $row2['runtime1'] == 0) {
                //在运行时间内的
                $login = 1;
                if ($row2['state'] == 1) {
                    //上次正常运行的
                    $json = $YIBAN->getLogin($row2['ybuser']);
                    if (is_array($json) && $json['code'] == 200 && array_key_exists('isLogin', $json['data']) && $json['data']['isLogin'] == 1) {
                        //检测登录状态成功
                        $login = 0;
                        // print_r($json);
                        $m = "lastruntime='" . time() . "',state='1'";
                        $nick = $json['data']['user']['nick'];
                        // echo $nick;
                        $m .= $nick == $row2['nick'] ? '' : ",nick='{$nick}'";
                        // echo $row2['id'];
                        $sql = "UPDATE `ybuser` SET {$m} where id='{$row2['id']}'";
Пример #4
0
<?php

ignore_user_abort();
//关掉浏览器,PHP脚本也可以继续执行.
set_time_limit(0);
//让程序无限制的执行下去
include "../config/mysql_config.php";
include '../funclass/YBClass.php';
$YIBAN = new YBClass();
$sql = "select * from ybuser where run='1' ";
$re0 = $mysqli->query($sql);
if ($re0) {
    if ($re0->num_rows >= 1) {
        $h = date("H");
        while ($row2 = $re0->fetch_array()) {
            if ($row2['runtime1'] <= $h && $row2['runtime2'] >= $h || $row2['runtime1'] == $row2['runtime2'] && $row2['runtime1'] == 0) {
                //在运行时间内的
                if ($row2['state'] == 1 && $row2['dayin'] == 1) {
                    //上次正常运行的,且开启动态功能
                    if (date("Y-m-d") != date("Y-m-d", $row2['lastdayintime'] == '' ? time() : $row2['lastdayintime'])) {
                        //今天未签到
                        $json = $YIBAN->getLogin($row2['ybuser']);
                        if (is_array($json) && $json['code'] == 200 && array_key_exists('isLogin', $json['data']) && $json['data']['isLogin'] == 1) {
                            //检测登录状态成功
                            $re = $YIBAN->DayIn($row2['ybuser']);
                            if (is_array($re) && array_key_exists('code', $re) && $re['code'] == 202) {
                                //已经签到
                                $m = "lastdayintime='" . time() . "',state='1'";
                                $sql = "UPDATE `ybuser` SET {$m} where id='{$row2['id']}'";
                                $re2 = $mysqli->query($sql);
                                echo __LINE__ . '.';
Пример #5
0
<?php

ignore_user_abort();
//关掉浏览器,PHP脚本也可以继续执行.
set_time_limit(0);
//让程序无限制的执行下去
include "../config/mysql_config.php";
include '../funclass/YBClass.php';
$YIBAN = new YBClass();
$sql = "select * from ybuser where run='1' ";
$re0 = $mysqli->query($sql);
$gH = 1 * mt_rand(1, 3);
//运行间隔
if ($re0) {
    if ($re0->num_rows >= 1) {
        $h = date("H");
        while ($row2 = $re0->fetch_array()) {
            // print_r($row2);
            if ($row2['runtime1'] <= $h && $row2['runtime2'] >= $h || $row2['runtime1'] == $row2['runtime2'] && $row2['runtime1'] == 0) {
                //在运行时间内的
                $now = time();
                $upH = round(($now - $row2['lastblogtime']) / 3600);
                //获得两个时间的间隔(小时)
                // echo $upH;
                if ($row2['state'] == 1 && $row2['blog'] == 1 && $upH >= $gH) {
                    //上次正常运行的,且开启博文功能,超过10个小时则运行一次
                    $json = $YIBAN->getLogin($row2['ybuser']);
                    // echo __LINE__.'.';
                    if (is_array($json) && $json['code'] == 200 && array_key_exists('isLogin', $json['data']) && $json['data']['isLogin'] == 1) {
                        //检测登录状态成功
                        $fiyid = $row2['blogMsg'] != 0 ? $row2['blogMsg'] : mt_rand(1, 6);
Пример #6
0
<?php

ignore_user_abort();
//关掉浏览器,PHP脚本也可以继续执行.
set_time_limit(0);
//让程序无限制的执行下去
include "../config/mysql_config.php";
include '../funclass/YBClass.php';
$YIBAN = new YBClass();
$gH = 30 * mt_rand(1, 4);
//运行间隔
$sql = "select * from ybuser where run='1' ";
$re0 = $mysqli->query($sql);
if ($re0) {
    if ($re0->num_rows >= 1) {
        $h = date("H");
        while ($row2 = $re0->fetch_array()) {
            // print_r($row2);
            if ($row2['runtime1'] <= $h && $row2['runtime2'] >= $h || $row2['runtime1'] == $row2['runtime2'] && $row2['runtime1'] == 0) {
                //在运行时间内的
                $now = time();
                $upH = round(($now - $row2['lasttrendstime']) / 60);
                //获得两个时间的间隔(小时)
                if ($row2['state'] == 1 && $row2['trends'] == 1 && $upH >= $gH) {
                    //上次正常运行的,且开启动态功能
                    $json = $YIBAN->getLogin($row2['ybuser']);
                    if (is_array($json) && $json['code'] == 200 && array_key_exists('isLogin', $json['data']) && $json['data']['isLogin'] == 1) {
                        //检测登录状态成功
                        $trendsmsg = $row2['trendsMsg'];
                        $YIBAN->UBB($trendsmsg);
                        $re = $YIBAN->trends($row2['ybuser'], $trendsmsg);