Ejemplo n.º 1
0
<?php

ini_set('max_execution_time', 30000);
require 'html.inc';
require 'header.php';
require 'config.php';
require 'functions.php';
echo "<h4 class='help'>This is where you can unfollow everyone who isn't in your whitelist. Yes, this even includes mutually-followed users.</h4>";
if (isset($_POST['unfollow']) && isset($_POST['followingArray'])) {
    $followingArray = unserialize($_POST['followingArray']);
    //print_r($followingArray);
    unfollow_by_id($connection, $followingArray, $dataFileDirectory);
} else {
    $canUnfollow = follow_check($connection, $debug, $myScreenName, $cursorTarget);
    if ($debug) {
        echo "canFollow: {$canFollow}<br>";
    }
    if ($canUnfollow) {
        loading_gif();
        $followingArray = find_followers($connection, $myScreenName, $count, $debug, $dataFileDirectory);
        if ($debug) {
            echo 'Follower Array Finished: ';
            print_r($followingArray);
        }
        $followingNumber = count($followingArray);
        //echo $followingNumber. "<br>";
        $whitelistArray = getWhitelist($dataFileDirectory, 'ids');
        $whitelistCount = count($whitelistArray);
        //echo $whitelistCount;
        $finalFollowingNumber = $followingNumber - $whitelistCount;
        $followingArray = serialize($followingArray);
Ejemplo n.º 2
0
<?php

ini_set('max_execution_time', 30000);
require 'html.inc';
require 'header.php';
require 'config.php';
require 'functions.php';
echo "<h4 class='help'>This is where you can unfollow people who you are following, but they never returned the favor.</h4>";
if (isset($_POST['unfollow']) && isset($_POST['unfollowerArray'])) {
    $unfollowerArray = unserialize($_POST['unfollowerArray']);
    if ($debug) {
        print_r($unfollowerArray);
    }
    unfollow_by_id($connection, $unfollowerArray, $dataFileDirectory);
} else {
    $canUnfollow = follow_check($connection, $debug, $myScreenName, $cursorTarget);
    if ($debug) {
        echo "canFollow: {$canFollow}<br>";
    }
    if ($canUnfollow) {
        loading_gif();
        $unfollowerArray = find_unfollowers($connection, $myScreenName, $count, $debug);
        if ($debug) {
            echo 'Unfollower Array Finished: ';
            print_r($unfollowerArray);
        }
        $unfollowerNumber = count($unfollowerArray);
        $unfollowerArray = serialize($unfollowerArray);
        if ($unfollowerNumber > 0) {
            ?>
<script src="../../assets/js/functions.js" type="text/javascript"></script><?php