{"id":1614,"date":"2011-02-24T12:21:04","date_gmt":"2011-02-24T18:21:04","guid":{"rendered":"http:\/\/bililite.nfshost.com\/blog\/?p=1614"},"modified":"2011-02-24T13:13:20","modified_gmt":"2011-02-24T19:13:20","slug":"trying-to-search-with-bing-and-failing","status":"publish","type":"post","link":"https:\/\/bililite.com\/blog\/2011\/02\/24\/trying-to-search-with-bing-and-failing\/","title":{"rendered":"Trying to Search with Bing and Failing"},"content":{"rendered":"<p>I'm not a fan of having to create a Google Custom Search Engine to limit searches to one site with an HTML form (which seems to <a href=\"\/blog\/2011\/02\/23\/back-to-a-simple-google-search-form\/\">be necessary for mobile sites<\/a>), so let's play with Bing:<\/p>\r\n<pre><code class=\"language-html demo\">\r\n&lt;form method=\"get\" action=\"http:\/\/www.bing.com\/search\" &gt;\r\n\t&lt;input name=\"q\" type=\"text\"\/&gt;\r\n\t&lt;input type=\"submit\" value=\"Search with Bing\"\/&gt;\r\n\t&lt;input name=\"q1\" value=\"site:http:\/\/bililite.nfshost.com\/blog\" type=\"hidden\"\/&gt;\r\n&lt;\/form&gt;<\/code><\/pre>\r\n<p>And it works, but fails again on the mobile site, just like Google. This may get better as the search engines figure it out, but I'm going to have to write my own search engine portal. What a pain.<\/p>\r\n<p>Actually, not such a pain. Something like:<\/p>\r\n<pre><code class=\"language-php\">header('Location: http:\/\/www.bing.com\/search?q='.urlencode($_GET['q']).'+'.urlencode($_GET['q1']))<\/code><\/pre>\r\n<p>for Bing and<\/p>\r\n<pre><code class=\"language-php\">header('Location: http:\/\/www.google.com\/search?q='.urlencode($_GET['q']).'+site:'.urlencode($_GET['sitesearch']))<\/code><\/pre>\r\n<p>for Google. And that's what I did for the <a href=\"http:\/\/youngisrael-stl.org\">Young Israel site<\/a><\/p>\r\n\r\n\r\n","protected":false},"excerpt":{"rendered":"I'm not a fan of having to create a Google Custom Search Engine to limit searches to one site with an HTML form (which seems to be necessary for mobile sites), so let's play with Bing: &lt;form method=\"get\" action=\"http:\/\/www.bing.com\/search\" &gt; &lt;input name=\"q\" type=\"text\"\/&gt; &lt;input type=\"submit\" value=\"Search with Bing\"\/&gt; &lt;input name=\"q1\" value=\"site:http:\/\/bililite.nfshost.com\/blog\" type=\"hidden\"\/&gt; &lt;\/form&gt; And it [&hellip;]","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"_links":{"self":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/1614"}],"collection":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/comments?post=1614"}],"version-history":[{"count":12,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/1614\/revisions"}],"predecessor-version":[{"id":1626,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/1614\/revisions\/1626"}],"wp:attachment":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/media?parent=1614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/categories?post=1614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/tags?post=1614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}