Skip to content
Browse files

fixes

  • Loading branch information...
1 parent 1e24c4c commit 24ee77c36e962c92f0f517dfa69eede3053aded8 @codepo8 committed Dec 9, 2009
Showing with 29 additions and 9 deletions.
  1. +14 −9 goohoobi.php
  2. +15 −0 index.php
View
23 goohoobi.php
@@ -1,25 +1,30 @@
+<?php
/*
GooHooBi API by Christian Heilmann
Homepage: http://github.com/codepo8/GooHooBi
Copyright (c)2009,2010 Christian Heilmann
Code licensed under the BSD License:
http://wait-till-i.com/license.txt
*/
+?>
<?php if(isset($_GET['json'])){
header('content-type:text/javascript');
echo 'goohoobi.se({"result":"';
}?>
<?php if(isset($_GET['search'])){
$query = filter_input(INPUT_GET, 'search', FILTER_SANITIZE_SPECIAL_CHARS);
-$url = 'select * from query.multi where queries=\'select '.
- 'Title,Description,Url,DisplayUrl from microsoft.bing.web(20) '.
- 'where query="'.$query.'";select title,clickurl,abstract,'.
- 'dispurl from search.web(20) where query = "'.$query.'";'.
- 'select titleNoFormatting,url,content,visibleUrl '.
- 'from google.search(20) where q = "'.$query.'"\'';
-$api ='http://query.yahooapis.com/v1/public/yql?q='.
- urlencode($url).'&format=json&env=store'.
- '%3A%2F%2Fdatatables.org%2Falltableswithkeys&diagnostics=false';
+
+$queries[] = 'select Title,Description,Url,DisplayUrl '.
+ 'from microsoft.bing.web(20) where query="'.$query.'"';
+$queries[] = 'select title,clickurl,abstract,dispurl '.
+ 'from search.web(20) where query = "'.$query.'"';
+$queries[] = 'select titleNoFormatting,url,content,visibleUrl '.
+ 'from google.search(20) where q="'.$query.'"';
+$url = "select * from query.multi where queries='".join($queries,';')."'";
+$api = 'http://query.yahooapis.com/v1/public/yql?q='.
+ urlencode($url).'&format=json&env=store'.
+ '%3A%2F%2Fdatatables.org%2Falltableswithkeys&diagnostics=false';
+
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
View
15 index.php
@@ -103,5 +103,20 @@ function doSearch(){
return {se:seed}
}();
</script>
+
+<!-- Start of StatCounter Code -->
+<script type="text/javascript">
+var sc_project=968400,sc_invisible=1,sc_partition=46,
+ sc_click_stat=1,sc_security="55a9fb8f",sc_text=2;
+</script>
+<script type="text/javascript"
+src="http://www.statcounter.com/counter/counter.js"></script><noscript><div
+class="statcounter"><a title="iweb stats"
+href="http://www.statcounter.com/iweb/" target="_blank"><img
+class="statcounter"
+src="http://c.statcounter.com/968400/0/55a9fb8f/1/"
+alt="iweb stats" ></a></div></noscript>
+<!-- End of StatCounter Code -->
+
</body>
</html>

0 comments on commit 24ee77c

Please sign in to comment.
Something went wrong with that request. Please try again.