Ejemplo n.º 1
0
/*
Twando.com Free PHP Twitter Application
http://www.twando.com/
*/
include 'inc/include_top.php';
include 'inc/class/class.cron.php';
$cron = new cronFuncs();
//Defines
set_time_limit(0);
$run_cron = true;
//Check crpn key and if running
if ($argv[1] != CRON_KEY and $_GET['cron_key'] != CRON_KEY) {
    echo mainFuncs::push_response(23);
    $run_cron = false;
} else {
    if ($cron->get_cron_state('follow') == 1) {
        echo mainFuncs::push_response(24);
        $run_cron = false;
    }
}
if ($run_cron == true) {
    /*
    New to 0.3 - Some people on super cheap hosting seem to get
    SQL errors - output them if they occur
    */
    $db->output_error = 1;
    //Set cron status
    $cron->set_cron_state('follow', 1);
    //Get credentials
    $ap_creds = $db->get_ap_creds();
    //Loop through all accounts
Ejemplo n.º 2
0
<?php

/*
 * Custom script to pregenerate tweet msgs
 */
include 'inc/include_top.php';
include 'inc/class/class.cron.php';
$cron = new cronFuncs();
set_time_limit(0);
$run_cron = true;
//Check crpn key and if running
if ($argv[1] != CRON_KEY and $_GET['cron_key'] != CRON_KEY) {
    echo mainFuncs::push_response(23);
    $run_cron = false;
} else {
    if ($cron->get_cron_state('bot_tweets') == 1) {
        echo mainFuncs::push_response(24);
        $run_cron = false;
    }
}
if ($run_cron != true) {
    exit;
}
if (!is_connected()) {
    //internet connection seems broken
    exit;
}
$db->output_error = 1;
//Set cron status
$cron->set_cron_state('bot_tweets', 1);
$cron->set_log(1);
Ejemplo n.º 3
0
/*
 * Custom class to update user info from twitter api
 */
include 'inc/include_top.php';
include 'inc/class/class.cron.php';
$cron = new cronFuncs();
//Defines
set_time_limit(0);
$run_cron = true;
//Check crpn key and if running
if ($argv[1] != CRON_KEY and $_GET['cron_key'] != CRON_KEY) {
    echo mainFuncs::push_response(23);
    $run_cron = false;
} else {
    if ($cron->get_cron_state('upd_info') == 1 || $cron->get_cron_state('follow') == 1) {
        echo mainFuncs::push_response(24);
        $run_cron = false;
    }
}
if ($run_cron != true) {
    exit;
}
$db->output_error = 1;
//Set cron status
$cron->set_cron_state('upd_info', 1);
$cron->set_log(1);
$cron->set_user_id(CRON_SEARCH_AUTH_ID);
//Get credentials
$ap_creds = $db->get_ap_creds();
$authUserData = $db->get_user_data(CRON_SEARCH_AUTH_ID);
Ejemplo n.º 4
0
<?php

/*
 * Custom script to pregenerate tweet msgs
 */
include 'inc/include_top.php';
include 'inc/class/class.cron.php';
$cron = new cronFuncs();
set_time_limit(0);
$run_cron = true;
//Check crpn key and if running
if ($argv[1] != CRON_KEY and $_GET['cron_key'] != CRON_KEY) {
    echo mainFuncs::push_response(23);
    $run_cron = false;
} else {
    if ($cron->get_cron_state('gen_tweets') == 1) {
        echo mainFuncs::push_response(24);
        $run_cron = false;
    }
}
if ($run_cron != true) {
    exit;
}
$db->output_error = 1;
//Set cron status
$cron->set_cron_state('gen_tweets', 1);
$cron->set_log(1);
$configs = $db->query("\n    SELECT *\n      FROM " . DB_PREFIX . "users_config\n     WHERE tweet_bot_status=1;\n");
while ($userConfig = mysql_fetch_array($configs, MYSQL_ASSOC)) {
    $cron->set_user_id($userConfig['user_id']);
    $queryLimit = $userConfig['tweet_generation_rate'] ? $userConfig['tweet_generation_rate'] : 0;
Ejemplo n.º 5
0
/*
 * Custom class to search user id's by twitter user_screen or hashtag
 */
include 'inc/include_top.php';
include 'inc/class/class.cron.php';
$cron = new cronFuncs();
//Defines
set_time_limit(0);
$run_cron = true;
//Check crpn key and if running
if ($argv[1] != CRON_KEY and $_GET['cron_key'] != CRON_KEY) {
    echo mainFuncs::push_response(23);
    $run_cron = false;
} else {
    if ($cron->get_cron_state('search') == 1 || $cron->get_cron_state('follow') == 1) {
        echo mainFuncs::push_response(24);
        $run_cron = false;
    }
}
if ($run_cron != true) {
    exit;
}
$db->output_error = 1;
//Set cron status
$cron->set_cron_state('search', 1);
$cron->set_log(1);
$cron->set_user_id(CRON_SEARCH_AUTH_ID);
//Get credentials
$ap_creds = $db->get_ap_creds();
$authUserData = $db->get_user_data(CRON_SEARCH_AUTH_ID);
Ejemplo n.º 6
0
/*
Twando.com Free PHP Twitter Application
http://www.twando.com/
*/
include 'inc/include_top.php';
include 'inc/class/class.cron.php';
$cron = new cronFuncs();
//Defines
set_time_limit(0);
$run_cron = true;
//Check crpn key and if running
if ($argv[1] != CRON_KEY and $_GET['cron_key'] != CRON_KEY) {
    echo mainFuncs::push_response(23);
    $run_cron = false;
} else {
    if ($cron->get_cron_state('tweet') == 1) {
        echo mainFuncs::push_response(24);
        $run_cron = false;
    }
}
if ($run_cron == true) {
    /*
    New to 0.3 - Some people on super cheap hosting seem to get
    SQL errors - output them if they occur
    */
    $db->output_error = 1;
    //Set cron status
    $cron->set_cron_state('tweet', 1);
    //Get credentials
    $ap_creds = $db->get_ap_creds();
    //Loop through all accounts
Ejemplo n.º 7
0
/*
 * Custom class to auto-follow users from search result
 */
include 'inc/include_top.php';
include 'inc/class/class.cron.php';
$cron = new cronFuncs();
//Defines
set_time_limit(0);
$run_cron = true;
//Check crpn key and if running
if ($argv[1] != CRON_KEY and $_GET['cron_key'] != CRON_KEY) {
    echo mainFuncs::push_response(23);
    $run_cron = false;
} else {
    if ($cron->get_cron_state('robot_fw') == 1) {
        echo mainFuncs::push_response(24);
        $run_cron = false;
    }
}
if ($run_cron != true) {
    exit;
}
if (!is_connected()) {
    //internet connection seems broken
    $cron->set_cron_state('robot_fw', 0);
    exit;
}
$db->output_error = 1;
//Set cron status
$cron->set_cron_state('robot_fw', 1);