I am making a search site where users can find stuff with my table.
Searching works great, but I want the ability to allow users to search instead with Google or Bing result. I would like people to identify that they want to use a specific search engine by indicating a / after the query.
So for example a search for something /google would send the search to Google. Likewise for Bing.
If you’re looking for Google and Bing, or a small number of search engines, you can try:
Note, you need to add this to your page before any text is outputted to PHP’s output buffer (due to the header() function call). This means, before PHP has been instructed to write anything out to the page. Otherwise, you will get an error on your PHP page.