Gmn kodu araştırdım ve buldum.
$twitterid = "naimtufekci";
// Burayı Değiştirmen yeterli
Demo :
http://naimtufekci.com/scr/latest-twitter/
Download :
http://naimtufekci.com/scr/latest-twitter/indir.zip index.php <?php
$twitterid = "naimtufekci";
require_once('latesttweet.php');
?>latesttweet.php <?php
// naimtufekci.com/scr/latest-twitter
$username = $twitterid;
$prefix = "<p>";
$feed = "http://search.twitter.com/search.atom?q=from:" . $username . "&rpp=2";
function parse_feed($feed) {
$stepOne = explode("<content type=\"html\">", $feed);
$stepTwo = explode("</content>", $stepOne[1]);
$tweet = $stepTwo[0];
$tweet = str_replace("<", "<", $tweet);
$tweet = str_replace(">", ">", $tweet);
$tweet = str_replace(""", "\"", $tweet);
$tweet = str_replace("&apos;", "'", $tweet);
return $tweet;
}
$twitterFeed = file_get_contents($feed);
echo $prefix.parse_feed($twitterFeed).$suffix;
?>ve bu arada twitter takipçi sayısını da şu kodla çekebilirsin.
<?php
function get_data($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PORT, 80);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_REFERER, $referer);
//curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
$document = curl_exec($ch);
curl_close($ch);
return $document;
}
$urlpage_data = get_data("http://www.twitter.com/naimtufekci");
preg_match_all('#<span id="follower_count" class="stats_count numeric">(.*?)</span>#is', $urlpage_data, $urlmatches);
echo "Tam tamına ". $urlmatches[1][0] ."takipçiniz var.";
?>Herhangi bir sorun olursa
naim@naimtufekci.com mailinden ulaşabilirsin.