SlideShare a Scribd company logo
1 of 13
Creating SlideShare Instant   Demo :   http://home.iitb.ac.in/~saket.kumar/slideshare Source:https://github.com/saketkc/SlideShare-Instant t Saket Choudhary http://home.iitb.ac.in/~saket.kumar IIT Bombay
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 !
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
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 ! )
Code Snippets <input type=&quot;text&quot; class='search_input'  /><br/> Define an “onkeyup” event sen an ajax GET request to 'ajax.php' containing the parameters:  the 'ajaxeeequest' and 'query' $(&quot;.search_input&quot;).keyup(function()  { var search_input = $(this).val(); var keyword= encodeURIComponent(search_input); $.ajax({   type: &quot;GET&quot;,   url: &quot;ajax.php&quot;,    data:{'op':'ajaxrequest','query':keyword},   success: function(msg){    $('.inner').html(msg); //fetch the Slide and echo it on the page   }  }); });
Contact Me I am a Sophomore at IIT Bombay as of 2011 . I can be contacted at  [email_address]
Ajax.php <?php session_start(); $var=array(); global $vaar; //$var=[]; if ($_GET['op']==&quot;ajaxrequest&quot;) {$var=$_GET['query']; $api_key=&quot;8GD14Jk1&quot;; $secret=&quot;mnFaUN4s&quot;; $proxy=&quot;proxy&quot;; $pass=&quot;user:pwd&quot;; $timeout=0; $ts=time(); $hash=sha1($secret.$ts); # use CURL library to fetch remote file $apiurl=&quot;http://www.slideshare.net/api/2/search_slideshows?q=$var&quot;; $ch = curl_init(); curl_setopt ($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_PROXY, $proxy); curl_setopt($ch, CURLOPT_PROXYPORT,80); curl_setopt($ch, CURLOPT_PROXYUSERPWD,$pass); $url = $apiurl.&quot;&api_key=$api_key&ts=$ts&hash=$hash&items_per_page=1&quot;; curl_setopt ($ch, CURLOPT_URL, $url); $file_contents = curl_exec($ch); $xml = simplexml_load_string($file_contents); $number=1; foreach ( $xml->Slideshow as $files) {  $_SESSION[$var][$number]=$files->Embed;    //echo $_SESSION['sad']['2'];  $vaar[$number]=$_SESSION[$var][$number];  echo ($vaar[$number]);  $number=$number+1; } }
if ($_GET['op']==&quot;numberrequest&quot;) { // session_start(); $num=$_GET['number']; $query=$_GET['query']; $api_key=&quot;8GD14Jk1&quot;; $secret=&quot;mnFaUN4s&quot;; $proxy=”proxy” $pass=&quot;user:pwd”; $timeout=0; $ts=time(); $hash=sha1($secret.$ts); # use CURL library to fetch remote file $apiurl=&quot;http://www.slideshare.net/api/2/search_slideshows?q=$query&quot;;
$ch = curl_init(); curl_setopt ($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_PROXY, $proxy); curl_setopt($ch, CURLOPT_PROXYPORT,80); curl_setopt($ch, CURLOPT_PROXYUSERPWD,$pass); $url = $apiurl.&quot;&api_key=$api_key&ts=$ts&hash=$hash&items_per_page=$num&quot;; curl_setopt ($ch, CURLOPT_URL, $url); $file_contents = curl_exec($ch); //$res =  simplexml_load_file($file_contents); $xml = simplexml_load_string($file_contents); $number=1; foreach ( $xml->Slideshow as $files) {  $_SESSION[$var][$number]=$files->Embed;    $vaar[$number]=$_SESSION[$var][$number];  if ($number==$num)  {  echo $files->Embed;  }    $number=$number+1; }}   ?>
Index.php <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;> <head> <meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; />  <LINK href=&quot;style.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;> <title>SlideShare Instant</title> <script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;></script> <script src=&quot;http://chrisslidesharehacks.googlecode.com/files/previewer2.js&quot;></script> <script type=&quot;text/javascript&quot;> $(document).ready(function() { var number=01; $(&quot;.search_input&quot;).focus(); $(&quot;.search_input&quot;).keyup(function()  { var search_input = $(this).val(); var keyword= encodeURIComponent(search_input); $.ajax({   type: &quot;GET&quot;,   url: &quot;ajax.php&quot;,   data:{'op':'ajaxrequest','query':keyword},   success: function(msg){   $('.inner').html(msg);   }  }); });
$('#next').click(function() {   number=number+1;   var keyword = $(&quot;.search_input&quot;).val();   $.ajax({   type: &quot;GET&quot;,   url: &quot;ajax.php&quot;,   data:{'op':'numberrequest','query':keyword,'number':number},   success: function(msg){   $('.inner').html(msg);//=msg;   }  }); }); $('#prev').click(function() {     number=number-1;   var keyword = $(&quot;.search_input&quot;).val();
$.ajax({   type: &quot;GET&quot;,   url: &quot;ajax.php&quot;,   data:{'op':'numberrequest','query':keyword,'number':number},   success: function(msg){   $('.inner').html(msg);//=msg;   }  }); }); }); </script> <body> <center> SlideShare Instant Query<input type=&quot;text&quot; class='search_input'  /><br/> <div class=&quot;container&quot;> <div class=&quot;inner&quot;></div> <button id=&quot;next&quot;> Next--</div> <button id=&quot;prev&quot;>--Prev</div> </div> </center> </body>

More Related Content

What's hot

Learn chinese name from getting a chinese name
Learn chinese name from getting a chinese nameLearn chinese name from getting a chinese name
Learn chinese name from getting a chinese namemiles peng
 
Facebook Development with Zend Framework
Facebook Development with Zend FrameworkFacebook Development with Zend Framework
Facebook Development with Zend FrameworkBrett Harris
 
Html5的应用与推行
Html5的应用与推行Html5的应用与推行
Html5的应用与推行Sofish Lin
 
Multimedia on the web - HTML5 video and audio
Multimedia on the web - HTML5 video and audioMultimedia on the web - HTML5 video and audio
Multimedia on the web - HTML5 video and audioChristian Heilmann
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hopeMarcus Ramberg
 
Behat - Drupal South 2018
Behat  - Drupal South 2018Behat  - Drupal South 2018
Behat - Drupal South 2018Berend de Boer
 
計算機概論20161205
計算機概論20161205計算機概論20161205
計算機概論20161205志宇 許
 
Desafios do Profissionalismo Ágil
Desafios do Profissionalismo ÁgilDesafios do Profissionalismo Ágil
Desafios do Profissionalismo ÁgilVictor Hugo Germano
 
計算機概論20161212
計算機概論20161212計算機概論20161212
計算機概論20161212志宇 許
 
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre ArmedaReno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre ArmedaDre Armeda
 
Advanced and Hidden WordPress APIs
Advanced and Hidden WordPress APIsAdvanced and Hidden WordPress APIs
Advanced and Hidden WordPress APIsandrewnacin
 
Page Caching Resurrected
Page Caching ResurrectedPage Caching Resurrected
Page Caching ResurrectedBen Scofield
 
Evolution of API With Blogging
Evolution of API With BloggingEvolution of API With Blogging
Evolution of API With BloggingTakatsugu Shigeta
 
Web Projects: From Theory To Practice
Web Projects: From Theory To PracticeWeb Projects: From Theory To Practice
Web Projects: From Theory To PracticeSergey Bolshchikov
 
Php Basic Security
Php Basic SecurityPhp Basic Security
Php Basic Securitymussawir20
 
#3 HTML & CSS [know-how]
#3 HTML & CSS [know-how]#3 HTML & CSS [know-how]
#3 HTML & CSS [know-how]Dalibor Gogic
 
HTML5 and the web of tomorrow!
HTML5  and the  web of tomorrow!HTML5  and the  web of tomorrow!
HTML5 and the web of tomorrow!Christian Heilmann
 

What's hot (20)

Learn chinese name from getting a chinese name
Learn chinese name from getting a chinese nameLearn chinese name from getting a chinese name
Learn chinese name from getting a chinese name
 
BDD with cucumber
BDD with cucumberBDD with cucumber
BDD with cucumber
 
Facebook Development with Zend Framework
Facebook Development with Zend FrameworkFacebook Development with Zend Framework
Facebook Development with Zend Framework
 
Using HTML5 sensibly
Using HTML5 sensiblyUsing HTML5 sensibly
Using HTML5 sensibly
 
Html5的应用与推行
Html5的应用与推行Html5的应用与推行
Html5的应用与推行
 
Multimedia on the web - HTML5 video and audio
Multimedia on the web - HTML5 video and audioMultimedia on the web - HTML5 video and audio
Multimedia on the web - HTML5 video and audio
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hope
 
Mojolicious on Steroids
Mojolicious on SteroidsMojolicious on Steroids
Mojolicious on Steroids
 
Behat - Drupal South 2018
Behat  - Drupal South 2018Behat  - Drupal South 2018
Behat - Drupal South 2018
 
計算機概論20161205
計算機概論20161205計算機概論20161205
計算機概論20161205
 
Desafios do Profissionalismo Ágil
Desafios do Profissionalismo ÁgilDesafios do Profissionalismo Ágil
Desafios do Profissionalismo Ágil
 
計算機概論20161212
計算機概論20161212計算機概論20161212
計算機概論20161212
 
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre ArmedaReno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
 
Advanced and Hidden WordPress APIs
Advanced and Hidden WordPress APIsAdvanced and Hidden WordPress APIs
Advanced and Hidden WordPress APIs
 
Page Caching Resurrected
Page Caching ResurrectedPage Caching Resurrected
Page Caching Resurrected
 
Evolution of API With Blogging
Evolution of API With BloggingEvolution of API With Blogging
Evolution of API With Blogging
 
Web Projects: From Theory To Practice
Web Projects: From Theory To PracticeWeb Projects: From Theory To Practice
Web Projects: From Theory To Practice
 
Php Basic Security
Php Basic SecurityPhp Basic Security
Php Basic Security
 
#3 HTML & CSS [know-how]
#3 HTML & CSS [know-how]#3 HTML & CSS [know-how]
#3 HTML & CSS [know-how]
 
HTML5 and the web of tomorrow!
HTML5  and the  web of tomorrow!HTML5  and the  web of tomorrow!
HTML5 and the web of tomorrow!
 

Viewers also liked (17)

ch1
ch1ch1
ch1
 
Equips de 4 t
Equips de 4 tEquips de 4 t
Equips de 4 t
 
ch1
ch1ch1
ch1
 
ch1
ch1ch1
ch1
 
Equips de 4 t
Equips de 4 tEquips de 4 t
Equips de 4 t
 
Headhunting
HeadhuntingHeadhunting
Headhunting
 
Equips de 4 t
Equips de 4 tEquips de 4 t
Equips de 4 t
 
Campionat 4t
Campionat 4tCampionat 4t
Campionat 4t
 
ch1
ch1ch1
ch1
 
Python Workshop
Python WorkshopPython Workshop
Python Workshop
 
ch1
ch1ch1
ch1
 
Internship @SlideShare -My Experiences
Internship @SlideShare -My ExperiencesInternship @SlideShare -My Experiences
Internship @SlideShare -My Experiences
 
Global_Health_and_Intersectoral_Collaboration
Global_Health_and_Intersectoral_CollaborationGlobal_Health_and_Intersectoral_Collaboration
Global_Health_and_Intersectoral_Collaboration
 
Pattern Recognition in Clinical Data
Pattern Recognition in Clinical DataPattern Recognition in Clinical Data
Pattern Recognition in Clinical Data
 
CL 324 PRoj
CL 324 PRojCL 324 PRoj
CL 324 PRoj
 
SlideShare Instant
SlideShare InstantSlideShare Instant
SlideShare Instant
 
Sniffer[1]
Sniffer[1]Sniffer[1]
Sniffer[1]
 

Similar to SlideShare Instant

PHP Presentation
PHP PresentationPHP Presentation
PHP PresentationAnkush Jain
 
Introduction To Lamp
Introduction To LampIntroduction To Lamp
Introduction To LampAmzad Hossain
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page CreationWildan Maulana
 
Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Michiel Rook
 
Система рендеринга в Magento
Система рендеринга в MagentoСистема рендеринга в Magento
Система рендеринга в MagentoMagecom Ukraine
 
WordPress Development Confoo 2010
WordPress Development Confoo 2010WordPress Development Confoo 2010
WordPress Development Confoo 2010Brendan Sera-Shriar
 
Getting the Most Out of OpenSocial Gadgets
Getting the Most Out of OpenSocial GadgetsGetting the Most Out of OpenSocial Gadgets
Getting the Most Out of OpenSocial GadgetsAtlassian
 
Migration testing framework
Migration testing frameworkMigration testing framework
Migration testing frameworkIndicThreads
 
Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Tatsuhiko Miyagawa
 
Mechanize at the Ruby Drink-up of Sophia, November 2011
Mechanize at the Ruby Drink-up of Sophia, November 2011Mechanize at the Ruby Drink-up of Sophia, November 2011
Mechanize at the Ruby Drink-up of Sophia, November 2011rivierarb
 
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM Alfresco Software
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax componentsIgnacio Coloma
 
Client-side JavaScript Vulnerabilities
Client-side JavaScript VulnerabilitiesClient-side JavaScript Vulnerabilities
Client-side JavaScript VulnerabilitiesOry Segal
 
Flash Templates- Joomla!Days NL 2009 #jd09nl
Flash Templates- Joomla!Days NL 2009 #jd09nlFlash Templates- Joomla!Days NL 2009 #jd09nl
Flash Templates- Joomla!Days NL 2009 #jd09nlJoomla!Days Netherlands
 
Flash templates for Joomla!
Flash templates for Joomla!Flash templates for Joomla!
Flash templates for Joomla!Herman Peeren
 
PHP Presentation
PHP PresentationPHP Presentation
PHP PresentationNikhil Jain
 
Forum Presentation
Forum PresentationForum Presentation
Forum PresentationAngus Pratt
 

Similar to SlideShare Instant (20)

PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
Introduction To Lamp
Introduction To LampIntroduction To Lamp
Introduction To Lamp
 
Php 3 1
Php 3 1Php 3 1
Php 3 1
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page Creation
 
Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)
 
Система рендеринга в Magento
Система рендеринга в MagentoСистема рендеринга в Magento
Система рендеринга в Magento
 
Web Scraping with PHP
Web Scraping with PHPWeb Scraping with PHP
Web Scraping with PHP
 
WordPress Development Confoo 2010
WordPress Development Confoo 2010WordPress Development Confoo 2010
WordPress Development Confoo 2010
 
Getting the Most Out of OpenSocial Gadgets
Getting the Most Out of OpenSocial GadgetsGetting the Most Out of OpenSocial Gadgets
Getting the Most Out of OpenSocial Gadgets
 
Migration testing framework
Migration testing frameworkMigration testing framework
Migration testing framework
 
Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8
 
Mechanize at the Ruby Drink-up of Sophia, November 2011
Mechanize at the Ruby Drink-up of Sophia, November 2011Mechanize at the Ruby Drink-up of Sophia, November 2011
Mechanize at the Ruby Drink-up of Sophia, November 2011
 
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
 
Client-side JavaScript Vulnerabilities
Client-side JavaScript VulnerabilitiesClient-side JavaScript Vulnerabilities
Client-side JavaScript Vulnerabilities
 
Flash Templates- Joomla!Days NL 2009 #jd09nl
Flash Templates- Joomla!Days NL 2009 #jd09nlFlash Templates- Joomla!Days NL 2009 #jd09nl
Flash Templates- Joomla!Days NL 2009 #jd09nl
 
Flash templates for Joomla!
Flash templates for Joomla!Flash templates for Joomla!
Flash templates for Joomla!
 
DevDays09 Internet Explorer 8
DevDays09 Internet Explorer 8DevDays09 Internet Explorer 8
DevDays09 Internet Explorer 8
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
Forum Presentation
Forum PresentationForum Presentation
Forum Presentation
 

More from Saket Choudhary (20)

ISG-Presentacion
ISG-PresentacionISG-Presentacion
ISG-Presentacion
 
ISG-Presentacion
ISG-PresentacionISG-Presentacion
ISG-Presentacion
 
gsoc2012demo
gsoc2012demogsoc2012demo
gsoc2012demo
 
testppt
testppttestppt
testppt
 
testppt
testppttestppt
testppt
 
testppt
testppttestppt
testppt
 
testppt
testppttestppt
testppt
 
testppt
testppttestppt
testppt
 
Training_Authoring
Training_AuthoringTraining_Authoring
Training_Authoring
 
Training_Authoring
Training_AuthoringTraining_Authoring
Training_Authoring
 
Training_Authoring
Training_AuthoringTraining_Authoring
Training_Authoring
 
Training_Authoring
Training_AuthoringTraining_Authoring
Training_Authoring
 
Training_Authoring
Training_AuthoringTraining_Authoring
Training_Authoring
 
Training_Authoring
Training_AuthoringTraining_Authoring
Training_Authoring
 
Training_Authoring
Training_AuthoringTraining_Authoring
Training_Authoring
 
Training_Authoring
Training_AuthoringTraining_Authoring
Training_Authoring
 
Testslideshare1
Testslideshare1Testslideshare1
Testslideshare1
 
Testslideshare1
Testslideshare1Testslideshare1
Testslideshare1
 
Testslideshare1
Testslideshare1Testslideshare1
Testslideshare1
 
Testslideshare1
Testslideshare1Testslideshare1
Testslideshare1
 

Recently uploaded

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 

Recently uploaded (20)

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 

SlideShare Instant

  • 1. Creating SlideShare Instant Demo : http://home.iitb.ac.in/~saket.kumar/slideshare Source:https://github.com/saketkc/SlideShare-Instant t Saket Choudhary http://home.iitb.ac.in/~saket.kumar IIT Bombay
  • 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=&quot;text&quot; class='search_input' /><br/> Define an “onkeyup” event sen an ajax GET request to 'ajax.php' containing the parameters: the 'ajaxeeequest' and 'query' $(&quot;.search_input&quot;).keyup(function() { var search_input = $(this).val(); var keyword= encodeURIComponent(search_input); $.ajax({ type: &quot;GET&quot;, url: &quot;ajax.php&quot;, 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']==&quot;ajaxrequest&quot;) {$var=$_GET['query']; $api_key=&quot;8GD14Jk1&quot;; $secret=&quot;mnFaUN4s&quot;; $proxy=&quot;proxy&quot;; $pass=&quot;user:pwd&quot;; $timeout=0; $ts=time(); $hash=sha1($secret.$ts); # use CURL library to fetch remote file $apiurl=&quot;http://www.slideshare.net/api/2/search_slideshows?q=$var&quot;; $ch = curl_init(); curl_setopt ($ch, CURLOPT_RETURNTRANSFER,1);
  • 8. curl_setopt($ch, CURLOPT_PROXY, $proxy); curl_setopt($ch, CURLOPT_PROXYPORT,80); curl_setopt($ch, CURLOPT_PROXYUSERPWD,$pass); $url = $apiurl.&quot;&api_key=$api_key&ts=$ts&hash=$hash&items_per_page=1&quot;; curl_setopt ($ch, CURLOPT_URL, $url); $file_contents = curl_exec($ch); $xml = simplexml_load_string($file_contents); $number=1; foreach ( $xml->Slideshow as $files) { $_SESSION[$var][$number]=$files->Embed; //echo $_SESSION['sad']['2']; $vaar[$number]=$_SESSION[$var][$number]; echo ($vaar[$number]); $number=$number+1; } }
  • 9. if ($_GET['op']==&quot;numberrequest&quot;) { // session_start(); $num=$_GET['number']; $query=$_GET['query']; $api_key=&quot;8GD14Jk1&quot;; $secret=&quot;mnFaUN4s&quot;; $proxy=”proxy” $pass=&quot;user:pwd”; $timeout=0; $ts=time(); $hash=sha1($secret.$ts); # use CURL library to fetch remote file $apiurl=&quot;http://www.slideshare.net/api/2/search_slideshows?q=$query&quot;;
  • 10. $ch = curl_init(); curl_setopt ($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_PROXY, $proxy); curl_setopt($ch, CURLOPT_PROXYPORT,80); curl_setopt($ch, CURLOPT_PROXYUSERPWD,$pass); $url = $apiurl.&quot;&api_key=$api_key&ts=$ts&hash=$hash&items_per_page=$num&quot;; curl_setopt ($ch, CURLOPT_URL, $url); $file_contents = curl_exec($ch); //$res = simplexml_load_file($file_contents); $xml = simplexml_load_string($file_contents); $number=1; foreach ( $xml->Slideshow as $files) { $_SESSION[$var][$number]=$files->Embed; $vaar[$number]=$_SESSION[$var][$number]; if ($number==$num) { echo $files->Embed; } $number=$number+1; }} ?>
  • 11. Index.php <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;> <head> <meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /> <LINK href=&quot;style.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;> <title>SlideShare Instant</title> <script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;></script> <script src=&quot;http://chrisslidesharehacks.googlecode.com/files/previewer2.js&quot;></script> <script type=&quot;text/javascript&quot;> $(document).ready(function() { var number=01; $(&quot;.search_input&quot;).focus(); $(&quot;.search_input&quot;).keyup(function() { var search_input = $(this).val(); var keyword= encodeURIComponent(search_input); $.ajax({ type: &quot;GET&quot;, url: &quot;ajax.php&quot;, data:{'op':'ajaxrequest','query':keyword}, success: function(msg){ $('.inner').html(msg); } }); });
  • 12. $('#next').click(function() { number=number+1; var keyword = $(&quot;.search_input&quot;).val(); $.ajax({ type: &quot;GET&quot;, url: &quot;ajax.php&quot;, data:{'op':'numberrequest','query':keyword,'number':number}, success: function(msg){ $('.inner').html(msg);//=msg; } }); }); $('#prev').click(function() { number=number-1; var keyword = $(&quot;.search_input&quot;).val();
  • 13. $.ajax({ type: &quot;GET&quot;, url: &quot;ajax.php&quot;, data:{'op':'numberrequest','query':keyword,'number':number}, success: function(msg){ $('.inner').html(msg);//=msg; } }); }); }); </script> <body> <center> SlideShare Instant Query<input type=&quot;text&quot; class='search_input' /><br/> <div class=&quot;container&quot;> <div class=&quot;inner&quot;></div> <button id=&quot;next&quot;> Next--</div> <button id=&quot;prev&quot;>--Prev</div> </div> </center> </body>