2. What is “Instant”? 1.Get spontaneous results “on the go” while you type. 2.Saves time 3.First results are generally preffered reults hence search the “browsing Example: 1. Google Search Instant(Results appear as you type) 2. YouTube Instant : The thing that actually landd up its creator with a job offer !
3. SlideShare Instant ! Get instant results for your Slide/Document Search ! Not Satisfied with the first result?? Go Click the “Next” button ! Not So Fast Yet ! Well the source code is all open Go edit it ! Just Respect the Open Source Terms: https://github.com/saketkc/SlideShare-Instant Demo available at: http://home.iitb.ac.in/~saket.kumar/slideshare
4. Requirements 1.AJAX calls (Hail Google !) 2.PHP ( My favourite on Web So far ! I am falling in love with RoR though) 3. Javascript(jquery) 4. CSS (Brains with Beauty is the way everyonr likes it ! )
5. Code Snippets <input type="text" class='search_input' /><br/> Define an “onkeyup” event sen an ajax GET request to 'ajax.php' containing the parameters: the 'ajaxeeequest' and 'query' $(".search_input").keyup(function() { var search_input = $(this).val(); var keyword= encodeURIComponent(search_input); $.ajax({ type: "GET", url: "ajax.php", data:{'op':'ajaxrequest','query':keyword}, success: function(msg){ $('.inner').html(msg); //fetch the Slide and echo it on the page } }); });
6. Contact Me I am a Sophomore at IIT Bombay as of 2011 . I can be contacted at [email_address]
7. Ajax.php <?php session_start(); $var=array(); global $vaar; //$var=[]; if ($_GET['op']=="ajaxrequest") {$var=$_GET['query']; $api_key="8GD14Jk1"; $secret="mnFaUN4s"; $proxy="proxy"; $pass="user:pwd"; $timeout=0; $ts=time(); $hash=sha1($secret.$ts); # use CURL library to fetch remote file $apiurl="http://www.slideshare.net/api/2/search_slideshows?q=$var"; $ch = curl_init(); curl_setopt ($ch, CURLOPT_RETURNTRANSFER,1);