Pin It

Widgets

Script To Unfollow Many Twitter Users You Are Following: Mass Unfollow

Many people have many accounts on twitter and follow many people so that those people they followed can follow them back in return. But the most staggering thing with twitter is that you can only follow 2,000 people at a time.

mass-twitter-unfollow-script

Check: Top 5 Best Tools to Bulk/Mass Unfollow on Twitter

Today, I found a simple PHP script online that may relief you from manually unfollow those people you followed. This simple PHP script must be uploaded to a server and run it every time you want to do mass unfollow on your twitter account. Your server needs cURL before this script can run.

Here is the Script:


<?php

// Set username and password

$username = ‘username’;
$password = ‘password’;
// The twitter API address
$url = ‘http://www.twitter.com/friends/ids.xml’;
// Set up and execute the curl process
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, “$url”);
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_GET, 1);
curl_setopt($curl_handle, CURLOPT_USERPWD, “$username:$password”);

$buffer = curl_exec($curl_handle);
curl_close($curl_handle);
// check for success or failure
if (empty($buffer)) {
echo ‘Error’;
} else {
echo ‘<h1>Success Connate</h1><hr>’;
}
// xml to array
//
//echo $buffer ;
$xml = simplexml_load_string(“$buffer”);
foreach ($xml->children() as $child)
{
echo ” $child “;
// The twitter API address
$url_2 = “http://twitter.com/friendships/destroy.xml?user_id=$child”;
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, “$url_2″);
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_POST, 1);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, “status=$message”);
curl_setopt($curl_handle, CURLOPT_USERPWD, “$username:$password”);
$buffer_2 = curl_exec($curl_handle);
curl_close($curl_handle);
// check for success or failure
if (empty($buffer_2)) {
echo ‘Error’;
} else {
echo ‘Go to hell<br/><hr>’;
}
}
?>

How To Use & Install The Above Script:
1. Copy and paste the code above in your notepad,
2. Insert your twitter username and password into the script,
3. Save the script in the notepad as anything.php,
4. Then upload the script to you webhost,
5. After you must have uploaded the script successfully, go to the directory of the script e.g. http://www.yourdomain.com/anything.php. Make sure you secure the directory.


Stay Informed, Inspired and Motivated With Our Free Daily Tips. Add Your Email Now, Don’t Worry, Your Email Address Is Secure:
Enter your email address:

Confirm Your Email Address After Subscribing
We hate spam just as much as you do.


Enjoyed This Article? Follow us on Facebook or Twitter or add us to your circle on Google+ for our new updates.

3 comments so far. What are your thoughts?

Mohit Bumb said...
Reply To Comment

No Working :p

Andi Astina said...
Reply To Comment

Parse error: syntax error, unexpected ':' in /home/macav***/public_html/sup***.php on line 8

Rani Khairunnisa said...
Reply To Comment

ouh thankss

Click Here to Leave a Comment

Don't just read and walk away, Your Feedback Is Always Appreciated..

Note:
Please do not spam, spam comments will be deleted immediately upon review.

Like US on Facebook