I am trying to develop a site which should act as a personalized search tool (i:e)search results based on user interests and the keyword entered by the user.
Currently i want to use cURL to display results,
My doubt is ,
whenever the user search a keyword in my website search tab ,the results should be lifted from search engines and the results should be published in my site.
How can i use cURL to display search results based on the keyword pinged by the user in the search area .
Help me friends .
thanks in advance
You might want to check
Google Search API
Php Curl Docs
there are a lot of examples and use cases in both websites regarding to your question.
Related
I'm going to make search page in website using google search engine.
I'm using laravel 5.4 framework.
So I got the Google Custom Search API key.
And I created new google search engine here.
I got the search engine ID.
And I used "jan-drda/laravel-google-custom-search-engine" package for searching.
I can get the search result. but result is limited to lists of url that I
inserted in custom search engine.
How can I get the result same as google search result?
In other words, how can I search without searching url limitation.
I hope that make sense.
Remove all the urls entered in "Sites to Search" from and you will have the search returned from whole web.
Note: The results on main google search and results via google API, results would still vary.
All I want to do is a simple Google Images search. We were doing the old, really, incredibly simple way using the now completely deprecated JSON Image Search API.
That page now says it is included in Google Custom Search. The problem is that I don't want to search my own website, I want to search the web for images still. I cannot, for the life of me, find what the new way to do this is.
I have tried the Google API for PHP, it also works only with Custom Search which is only for searches on my website and not the entire web.
I have tried it using https://www.googleapis.com/customsearch/v1?key=MYKEY&cx=MYCX&q=candy and it's still searching our website only not the web in general.
Can someone point me to a documentation page that describes how to use an API to do an image search on the web in general and get results in the JSON?
You can indeed use the Google API for PHP. You just need to configure your custom search engine to search the entire web. To do this, login to your CSE settings at https://cse.google.com/cse/, and remove all sites.
Then, change 'Sites to search' to 'Search the entire web but emphasize included sites'.
Since you don't have any sites specified, it will just search the whole web.
You can test using the box on the right.
As for documentation, the CSE API is documented here https://developers.google.com/custom-search/json-api/v1/reference/cse/list#parameters
I am trying to generate/retrieve a list of news links from a keyword search from a news website using Python. For Google search, I know some use
requests, but while Google search page has its own link address (i.e. https://www.google.dz/search?q=keyword), some websites do not transfer keyword through web address.
First - for example, in http://english.hani.co.kr/ , users are led to a search result page http://search.hani.co.kr/Search with list of links regardless which keyword they type (Korea Times is another example). In this way, is it still possible to use Python library to extract those links?
Second - in the earlier two and many other cases (like this), the search results are displayed in as many as hundreds of pages. What tools and techniques should I turn to in order to produce a comprehensive list of news links?
There are two basic tasks that are used to scrape web sites:
Load a web page to a string.
Parse HTML from a web page to locate the interesting bits.
You can see more details how to do here.
So, some searchs engine use GET to do a search and others the method POST. For those that use method POST the unique way is doing the search (not by url) and get the html results for analyze.
Both ways(GET and POST) you can use beautifulsoup.
I am created a personalized search web application .I will create a signup,login and user will fill in his interests based on that i have a doubt in search
I only want to use PHP and JAVA Script alone.
1)After redirecting to that specific search page from login, when i type a specific keyword in that,all i need is ,I need to display results in that domain/web application by fetching the results from search engines.the results should be web content articles,image,video,news.
My doubts is how can i get the feeds from search engine to get displayed in my application such that the keyword which is provoked to search in the search tab should refer to match the user interests which is stored in the database based on this,it should provide the results.
I hope you friends understood the problem statement of this application.
Please help me solve this problem and if any code/book related to this,please tell me.
This isn't a well written question so I'm not entirely sure what you're asking. I interpret the problem as this:
You want a website that registers users with specified interests
You want those users to see tabulated results based on their interests (with the results being lifted from search engines).
The above being a correct interpretation, I would suggest you use something like the "curl" function, mentioned previously on Stackoverflow:
How to get Content ot Remote HTML page
In the above example, the URL specified would (in your case) contain the search engine string. Say you were searching for "bricks in china", then your url string that would be passed to the curl function, would be "https://www.google.co.zw/search?q=bricks+in+china&oq=bricks+in+china"
Another good example of tackling this problem (outside of the Stackoverflow community) is presented here: http://davidwalsh.name/curl-download
Hope that helps :)
I have implemented google custom search engine on my website http://www.finalyearondesk.com/
What I want is that when user enters his query into my own defined search bar, then the results [By result I mean the result that is displayed right after just entering the query and hitting enter, for example "ubuntu"] must be displayed in this page... http://www.finalyearondesk.com/search.php . At now the result are just displayed where I have inserted the code that google has given me.
The Google custom search is a JavaScript Ajax widget. The browser talks to Google independent of your site.
If you want results in your search.php page, either put the search-box on the search.php page, or query Google server side, then display the formatted results any way you like. This is very not ideal because Google limits the number of queries you can do.
Long story short, you have to live with the ads and limited placement options google gives you.
You can always attempt to write your own web search engine if you don't like it [/sarcasm]