Real Time Search Engine
Wall Script
Follow Me:
Wednesday, October 21, 2009

Real Time Search Engine

Implement real-time search engine using twitter widget script with PHP for discovering what people are tweeting about on the web right now. I want to explain how you can use twitter widget script to implement search results feature that displays in real time tweets.
Real Time Search Engine

Download Script     Live Demo

real_search.php
Contains simple PHP and HTML code with Twitter widget script.
<form method="get" action="" name="form">
<input type="text" name="q" />
<input type="submit" value=" Search " />
</form>

<?php
if($_GET['q'])
{
$search_word=$_GET['q'];
?>
<div> 
//twitter widget code

<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'search',
search: '<?php echo $search_word; ?>',
interval: 8000,
subject: 'Realtime results for "<?php echo $search_word; ?>" ',
width: 600,
height: 520,
theme: {
shell: {
background: '#ffffff',
color: '#000000'
},
tweets: {
background: '#ffffff',
color: '#444444',
links: '#1985b5'
}
},
features: {
scrollbar: false,
loop: false,
live: true,
hashtags: true,
timestamp: true,
avatars: true,
behavior: 'all'
}
}).render().start();
</script>
</div>
<?php
}
else
{
?>
<div> Reat Time Search Results </div>
<?php } ?>

Related Link
Was this article helpful?
Thanks! Your feedback helps us to improve 9lessons.info


7 comments:

  1. nice but Demo not working

    ReplyDelete
  2. aynen demo çalışmadı.. thankss

    ReplyDelete
  3. Of course, what a great site and informative posts with furniture, I will bookmark this site.

    ReplyDelete
  4. Hii Srinivas Tamada,
    the demo didnt work anymore, twitter using API 1.1 now..please update.

    ReplyDelete
  5. Very useful. We needed this for our our site.

    ReplyDelete

Make in India