Users Timeline On My Website


I want to make a widget for my website. In this widget the users of my website they will be able to connect to twitter and then the widget will shows their timeline. Is this possible?
Thank you in advance


PHP or JavaScript (jQuery) ?

PHP example


$username = “jimis_fou”;

$readurl = “".$username.".json”;

$rdata = json_decode(file_get_contents($readurl));

echo “


echo “\r\n”;

function url2link ($string, $target="_blank") {

preg_match_all(’|(http://[^\s]+)|’, $string, $matches1);
if($matches1) {
foreach($matches1[0] as $match1) {
$hypertext = “<a href=”".$match1."" target="".$target."">".$match1."";
$string = str_replace($match1, $hypertext, $string);

preg_match_all(’|(@[^\s]+)|’, $string, $matches2);
if($matches2) {
foreach($matches2[0] as $match2) {
$hypertext = “<a href=“”.$match2.”" target="".$target."">".$match2."";
$string = str_replace($match2, $hypertext, $string);

return $string;

foreach($rdata as $ritem) {

$showtext = $ritem->text;

$showtext = utf8_decode($showtext);
$showtext = url2link($showtext);

$status_timestamp = strtotime($ritem->created_at);
$status_locdate = date(“Y-m-d (H:i:s)”,$status_timestamp);

echo “<p style=“text-align:left; width:570px; clear:both;”>\r\n”;
echo “<a href=“”.$ritem->user->screen_name.”" title="".$ritem->user->name."" target="_blank"><img src="".$ritem->user->profile_image_url."" alt="".$ritem->user->name."" align=“left” width=“48” height=“48” border=“0” style=“padding:10px 8px 2px 0px;” />\r\n";
echo " <a href=“”.$ritem->user->screen_name."" title="".$ritem->user->name."" target="_blank"><strong style=“font-size:140%;”>".$ritem->user->screen_name."    “.$ritem->user->name.” \r\n";
echo “<span style=“padding:0px 12px 0px 0px; float:right;”>”.$status_locdate."\r\n";
echo “
echo “<span style=“display:block; margin:2px 0px 2px 54px; padding:6px; background:#DEDEDE; color:#000000;”>”.$showtext."\r\n";
echo "
echo “



jQuery example


have fun.


index,php ???


This no longer works because".$username.".json no longer exists


Awesome @10games! I’m new to PHP and I’m not finding the documentation particularly helpful (coming from JavaScript) and the ability to pull values from an object with $ritem->user->name totally made my day!