Son Tweetleri Listeleme

error_reporting(0);
$adet="1";
$site = file_get_contents("https://twitter.com/".$config["site"]["tweet_user"]);
preg_match_all('@<div class="js-tweet-text-container">(.*?)</div>@si',$site,$veri1);
preg_match_all('@<small class="time">(.*?)</small>@si',$site,$veri2);
preg_match_all('@<div class="ProfileAvatar">(.*?)</div>@si',$site,$veri3);
$kacadet=$adet-1; 
 echo '<h2>'.$lang["son_tweetler"].'</h2>
								<ul class="tweet-list">';
 for ($i = 0; $i <= $kacadet; $i++) { $tarih=strip_tags($veri2[0][$i]); $tweet=$tweet1=$veri1[0][$i]; if(!empty($tweet) && ($tarih)) {
echo '<li>
		<p>
			<a href="https://www.twitter.com/'.$config["site"]["tweet_user"].'" class="autor">@'.$config["site"]["tweet_user"].' </a> '.$tweet.'
<span style="color:#FFFFFF">'.$tarih.' </span>
	</li>';
 } } 	echo '</ul>';

 


Yorum Yapılmamış