Twitter_badge is a project mainly written in PHP, it's free.
A Twitter badge written in PHP
with the following Javascript (note, this code is for jQuery; you can adjust accordingly to standard Javascript or any other framework):
$(document).ready(function(){ $("#twitter-updates").load("twitter_badge.php"); });