// Arşivler

Web

This category contains 23 posts

Twitter Kullanımı video


Twitter Auto Follow Php Script

Follow twitter users by keywords

<?php

// Set the twitter user
$user = "";
$pass = "";
// The search term to follow based on (e.g. "soccer")
$term = "";

// Get already followed
$userApiUrl = "http://twitter.com/statuses/friends.json";

$ch = curl_init($userApiUrl);
curl_setopt($ch, CURLOPT_USERPWD, $user.":".$pass);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
       
$apiresponse = curl_exec($ch);
       
curl_close($ch);

$followed = array();

if ($apiresponse) {
    $json = json_decode($apiresponse);
    if ($json != null) {
        foreach ($json as $u) {
            $followed[] = $u->name;
        }
    }
}

$userApiUrl = "http://search.twitter.com/search.json?q=" . $term . "&rpp=100";

$ch = curl_init($userApiUrl);
curl_setopt($ch, CURLOPT_USERPWD, $user.":".$pass);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
       
$apiresponse = curl_exec($ch);
       
curl_close($ch);
       
if ($apiresponse) {
    $results = json_decode($apiresponse);
    $count = 20;
   
    if ($results != null) {
   
        $resultsArr = $results->results;
           
        if (is_array($resultsArr)) {
           
            foreach ($resultsArr as $result) {

                $from_user = $result->from_user;
           
                if (!in_array($from_user,$followed)) {

                    $ch = curl_init("http://twitter.com/friendships/create/" . $from_user . ".json");
                    curl_setopt($ch, CURLOPT_USERPWD, $user.":".$pass);
                    curl_setopt($ch, CURLOPT_POST, 1);
                    curl_setopt($ch, CURLOPT_POSTFIELDS,"follow=true");                
                    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
           
                    $apiresponse = curl_exec($ch);
                   
                    if ($apiresponse) {
                        $response = json_decode($apiresponse);
                       
                        if ($response != null) {
                            if (property_exists($response,"following")) {
                                if ($response->following === true) {
                                    echo "Now following " . $response->screen_name . "\n";
                                } else {
                                    echo "Couldn't follow " . $response->screen_name . "\n";
                                }
                            } else {
                                echo "Follow limit exceeded, skipped " . $from_user . "\n";
                            }
                        }
                       
                    }
       
                    curl_close($ch);
                       
                } else {
                    echo "Already following " . $from_user . "\n";
                }
           
            }
           
        }  
           
    }
   
       
}

?>


This code works great with cron jobs. If I could add a array of users not to follow, this script will be perfect for me.
Code source: http://code.google.com/p/twitter-autofollow/downloads/list

En iyi Download Programı JDownloader

Su gibi akan dosya indirme


Rapidshare, MegaUpload, Depositfiles, Filefactory gibi yerlerden dosyaları bilgisayarınıza aktarmak için en iyi download programı

Diğer programlardan farkı

  • Bir linke tıklayıp, kopyaladığınızda o dosya serverda mı yoksa silinmiş mi diye kontrol ediyor.
  • Download için şu kodları girin derdine son veriyor. Bazen bir kere kodu girmeniz yeterli oluyor bazen hiç gerekmiyor.(Captcha koduyla uğraştırmıyor.)
  • Rapidsharedeki, bir download’tan sonra uzun süre bekleme süresini kaldırmak için modeme reset atabiliyor. (Eğer modem ayarını yaptıysanız.)
  • Parça parça gelen downloadları birleştirip, sıkıştırılmış dosyayı açıp, gerek kalmayan sıkıştırılmış dosyaları siliyor.

Java mimarisinde, linux ve diğer işletim sistemlerinde çalışabilen başarılı bir program.

Twitter Ruby UnFollow Code

require 'rubygems'
require 'twitter'

auth = Twitter::HTTPAuth.new('twitter_username', 'password')
base   = Twitter::Base.new(auth)
guilty = base.friend_ids - base.follower_ids

puts "There are #{guilty.size} People you follow who do not follow you"

guilty.each do |user_id|
user = base.friendship_destroy([user_id])
puts  "#{user.id} not following anymore"
end

Orginal code only lists people which are not following you. http://blog.jerodsanto.net/2009/05/see-which-twitterers-dont-follow-youback-in-less-than-15-lines-of-ruby/#more-292

I changed the code a little and now it can be used for mass unfollow in twitter. Use responsibly, don’t forget you’re limitted by the api limit. I’m not sure but a user can make 150 requests from the api in a hour. This means you can unfollow 150 people in a hour.

How to Run the Code

Ubuntu users can run the code easily. Open a terminal and copy paste the codes.

sudo gem install twitter

After the installation process, copy the ruby code to a text editor which is given above. (Don’t forget to change the username and password)

Then save the file as unfollow.rb and run the code in terminal.

irb unfollow.rb

Google Analitik’e Yardımcı Programlar

Web sitenize ısı haritası ekleyin


Google analitik güzel ama ona bir kaç özellik katarak daha başarılı siteler oluşturulabilir. Web sitenizin ısı haritasını çıkarmak, çoğu kullanıcıya ilginç geleceğinden şüphem yok. Kullanıcılar nereyi çok tıklıyorlarsa oranın ısısı artacak sitenin ilgi noktaları ortaya çıkacak ve buna göre tasarımınızı yeniden gözden geçirmeniz mümkün olacak.

Açık kaynaklı bir proje olan clickheat’i hemen siteme ekledim sonuçlarını beklemekteyim.

http://www.labsmedia.com/clickheat/index.html

Daha profesyonel sonuçlar için

http://crazyegg.com/

http://kissmetrics.com/