Ever wanted to include a twitter feed on your website? Well it’s pretty straight forward to do with PHP…
entry) > 0) {
echo '
- ';
- ';
$description = $twit1->content;
$description = preg_replace("#(^|[\n ])@([^ \"\t\n\r<]*)#ise", "'\\1@\\2'", $description);
$description = preg_replace("#(^|[\n ])([\w]+?://[\w]+[^ \"\n\r\t<]*)#ise", "'\\1\\2'", $description);
$description = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#ise", "'\\1\\2'", $description);
$description = str_replace("updated);
$dayMonthyear = date('d F Y', $date);echo '
';
echo"
link[1]->attributes()->href,"\" title=\"", $twit1->author->name, "\" />\n";
//echo("".$dayMonthyear."");
echo $description;
echo '';
echo '
foreach ($search_res->entry as $twit1) {
echo '
';
}
echo '
';
}
curl_close($tw);
?>
Leave a reply