I'm making a simple website with a form where a user enters a word and then I take that word and google it using a php script and displaying the results. How would I be able to do this? or where would I get a script to do this?
I'm fairly sure reusing their results as you want to do is against their Terms of Service.
Why not simply create a form that redirects to the Google result page? Here is a tutorial on how.
Linking to Google Search Results
You would look for Google Site Search - http://www.google.com/sitesearch/
First, as quick solution, you should redirect your users to Google's result page.
When your sript receives the search term, it may
change spaces to "+" sign,
append it to the following URL: http://www.google.com/search?q=site%3Aexample.com+ (change example.com to your domain),
redirect to it.
Example: http://www.google.com/search?site=&q=site%3Astackoverflow.com+banana
Related
I hope someone can help me with this.
Currently when someone does a search on my website, the page that is returned has the URL:
http://www.dublinjobs.ie/main/index.
(Let's call this "the search results URL").
If you scroll to the bottom of the page you will see the pagination URLs use the form
http://www.dublinjobs.ie/main/index/2/basic/php/0/relevance/all/0/0/20/0/0/0/0/0/0/0.
(Let's call this "the pagination URL").
Is there some way I can change my website so the search results URL has a similar format to the pagination URL?
I need to to fix this because currently the search results URL cannot be bookmarked or emailed to someone as it is unspecific.
I'm guessing the solution is some sort of internal URL rewrite but I am not sure how to do this.
Thank you for your assistance.
EDIT: I don't want to just use a GET instead of a POST as I want to be able to control the URL layout.
Even your pagination URL doesn't include search term. What you need is to include search keywords in the URL itself to make it unique which can be bookmarked or shared.
Most likely you're using method="POST" in your search form which needs to change to: method="GET".
Note that it will make your URL like:
http://www.dublinjobs.ie/main/index?search=keyword
OK. I have a dirty hack fix.
I am using a header redirect in my PHP code to send them to the URL I want after doing my processing.
I am new to Java and JSF,
I was looking for some way to send a query term to toysrus.co.uk
I have already worked on php curl and I can handle it at my own, and I have coded my function which sends query term...
My issue is I am unable to create the query term and and I cant find a way to create a url in which I can add my query parameter so that I can curl this page.....
can somebody guide me how I can create the search url for toysrus.co.uk
what I want is, I will add my parameter in URL and the curl script will send this request to the site and I will get the searched product...
I want something like
http://www.toysrus.co.uk/index.jsf?seach=MYTERM
this is just an example what I want...
can somebody help me create the search URL for the said web site? being totally new to JSF, I am unable to do it...
also, when I googled on JSF and tried searching for helping material, I found not enough stuff on JSF
thanks for help..
You should be able to search the site just by changing the search term in the URL query string.
I went to the main page and typed "seriously" into the search box. Here's the address it sent me to:
http://www.toysrus.co.uk/index.jsf?fh_eds=%3f&fh_view_size=10&fh_start_index=0&fh_location=%2f%2ftrus%2fen_GB%2fcategories%3C%7btrus_trus%7d%2fitemtype%3dproduct%2f%24s%3dseriously&media=web
See where the search term shows up there? You can change that to any other word and it will search for that. Want to search for multiple terms, or a phrase? Try typing them into the search box and see how they're encoded in the URL. You can probably also remove or change some of those other parameters if you experiment with it.
I have a Textbox in a php page. If i enter a value in it, have to redirect to another website and search for the keyword i have entered in it. how to do this in php?
If the site you want to search is something like google you can use their API so with just a few changes in your html code, your form will search the web for the text entered. See this for example.
In the case the site you want to search has no built in tool or such functionality, you are basically hoping that the site is using the get method for searching, so you can build php location headers, after you process the entered information.
So if someone enters the term "find this" in your search box, you will have to do something like
header("Location: site_im_searching_in/blablabla?search=find+this")
Though the second method is anything but recomended because any time the site changes the way they process URL's or the syntax they use, you will be left with a broken box.
i was wondering if anyone had a link or tutorial for a search script that indexes urls with the # fragment.
For instance my url 'mysite.com/#About/index' isnt recognised by search engines etc. But i was wondering if there is a script i can use in my website that will help visitors search through these urls?
Entering 'mysite.com/#About/index' into an address bar would return the single page interface with the dynamic content loaded into it already.
I might be thinkin way ahead of myself but maybe a search script that indexes all pages then before displaying results sticks a '#' after the first '/' and takes off the '.php' from the end. Is this even possible??
Able to use php jquery and mysql
Have a look at this link to find out how you can make your content accessible to Google.
Google have established guidelines on this matter
http://code.google.com/web/ajaxcrawling/
http://code.google.com/web/ajaxcrawling/docs/getting-started.html
I have a classifieds website.
It has an index.html, which consists of a form. This form is the one users use to search for classifieds. The results of the search are displayed in an iframe in index.html, so the page wont reload or anything. However, the action of the form is a php-page, which does the work of fetching the classifieds etc.
Very simple.
My problem is, that google hasn't indexed any of the search results yet.
Must the links be on the same page as index.html for google to index the Search Results? (because it is currently displayed in an iframe)
Or is it because the content is dynamic?
I have a sitemap which works, with all URLS to the classifieds in the sitemap, but still not indexed.
I also have this robots.txt:
Disallow: /bincgi/
the php code is inside the /bincgi/ folder, could this be the reason why it isn't being indexed?
I have used rewrite to rewrite the URLS of the classifieds to
/annons/classified_title_here
And that is how the sitemap is made up, using the rewritten urls.
Any ideas why this isn't working?
Thanks
If you need more input let me know.
If the content is entirely dynamic and there is no other way to get to that content except by submitting the form, then Google is likely not indexing the results because of that. Like I mentioned in a comment elsewhere, Google did some experimental form submission on large sites in 2008, but I really have no idea if they expanded on that.
However, if you have a valid and accessible Google Sitemap, Google should index your classifieds fine. I suggest to use the Google Webmaster Tools to find out how Google treats your site and to diagnose any potential problems with crawling.
To use ebay is probably a bad example as its not impossible that google uses custom rules for such a popular site.
Although it is worth considering that ebay has text links to categories and sub categories of auction types, so it is possible to find auction items without actually filling in a form.
Personally, I'd get rid of the iframe, it's not unreasonable when submitting a form to load a new page.
that question is not answerable with the information given, to many open detail questions. if you post your site domain and URLs that you want to get indexed.
based on how you use GWT it can produce unindexable content.
Switch every parameters to GET
Make html links to those search queries on "known by Googlebot" webpages
and they'll be index