I want to build a system in which the user enters a website domain and a word, and the system shows in which place he is located.
How can I get the search result from Google? there is any way? I am working with PHP and JavaScript.
Google does not provide a public API for querying the ranking (PageRank) of a page.
You could perform the query yourself and check the results against the domain you're looking for, but unless you look only to the first pages, it becomes unfeasible.
As to how to perform Google searches programmatically, see the Custom Search API.
Related
I am working on a website where I want to get keyword that my website was searched for on Google.
For example my website is for architect services, someone goes on Google and searches for "Architectural drawings" and gets my site in search and clicks.
I want to get that keyword stored as variable to serve dynamic content.
EDIT
Looking at the answers I think i did not make myself clear.
I am signed up with analytics and I get reports on what keywords by site is being searched for.
What is currently want is When user clicks on google search result to visit my page, i want to use the keyword in order to deliver dynamic content on my page. so if user searched for "Architectural Drafting" and click on my link on search result, i want to deliver content related to architectural drafting and if keyword id "Architectural Design" then content may differ, so i need to get keyword stored as variable when visitor is on my page.
Is that possible?
EDIT 2
I got answer that this is not possible but somehow i came along a plugin that claims under "What The Visitor Wants to Learn From Your Website SPECIFICALLY" first point "by the keywords people are using to land on your website" check link [1]. if they can personalize on the keyword people used to land on my website, there must be some technique used if not cookies, i want to find that out.
[1] http://smartduu.com/content-personalization-plugin/
Regards
Manoj Soni
You need to sign up Google Search Console to see what keyword searches on Google.
Track your site's search performance with Google Search Console and
browse around for more webmaster resources.
Optionally you can sign up Google Analytics and links it up to Google Search Console so that you can access more advance data for keyword search.
If you associate a Google Analytics property with a site in your
Search Console account, you’ll be able to see Search Console data in
your Google Analytics reports. You’ll also be able to access Google
Analytics reports directly from the Links to your site, and Sitelinks
pages in Search Console.
No, that is not possible, at least not for organic search. The keyword is not included in the request that redirects a user from the search results to your page.
If you use Google Adwords then you can ad value track parameters with the search term dynamically filled in to your destination urls. This will work for paid traffic only.
Google Analytics will not help here (for the most part it does not include organic search keywords, either).
Google Search Console will give you info on organic search terms, but not in realtime and will not help for your use case.
As you know,google is blocked in China. Now I want to put a php search function in my website for user to search by a keyword and get result from my website and more important, from both two search engines, google and Baidu. I have already get done with baidu. But I can get done with google.
Here I have an idea: since my hosting is in mainland China, I can get another vps(like hostus) in USA, when some one search in my webisite, I can let program send a command to this second vps and let it do the specified research using google and send right back the result to my local vps.
is it possible? I know google has a way to identify robots. do you have any great idea to solve this? I want my user search a keyword and get result page on my website showing a website search, a baidu search and a dreaming gooogle search.
Thank you!
I am new to facebook api. I want to search for a particular word on facebook. I have gone through the documentation at https://developers.facebook.com/docs/reference/api/. But I dont know how to construct the query in PHP.
Could any one please provide a sample code. Also how do I specify the count and page (like twitter)?
I am currently using the API provided by facebook. I saw that there are alternative API's but I would like to restrict the API to the official one
Facebook provides the search functionality which is like searching using the search inside facebook.com.
To read about it go to here: http://developers.facebook.com/docs/reference/api/#searching
Edit
As it states in that document:
When searching for public posts or posts on the user's News Feed, you
can page over the results by using the since, until and limit
parameters. since and until both accept a unix timestamp.
Also, just a bit above the "searching" section there's the "Paging" section, using both you can come up with:
https://graph.facebook.com/search?q=coffee&type=place&offset=X&limit=4
Which in terms of using the php sdk, is probably like: "search?q=coffee&type=place&offset=X&limit=4"
I am trying to integrate a site search feature into a client's site. I've created an test search engine with Google Custom Search, but I can't sort out how to make it work with the following criteria:
The search form posts back to the site
The POST page uses an API to get the result back from Google
I display the results within my site
Am I misunderstanding how Google Custom Search works? Is there a simple tutorial somewhere that fits my criteria?
Thanks!
Google Custom Search Business Edition specifically has the API to return XML results, with which you can do what you please. Business Edition is not free.
Here is the XML results documentation.
From PHP, you can use cURL to pass your POSTed search query on to Google CSE as a GET request, and then do whatever you want with the XML server side or client side.
Check out http://www.google.com/cse/docs/resultsxml.html
But basically yeah: have a page on your site that when it gets a post/get variable it makes an http request to Google containing (at least) your search term and your api key, it then receives a load of XML in return which it then formats and returns on the page.
It's pretty straightforward. I've not implemented it in PHP, which judging by your tag is the lanaguage you're looking to do it in, but something like http://www.seopher.com/articles/google_custom_search_tutorial_using_xml_and_php_ should put you on the right track.
Is there an API (Twitter API does not provide this) that I can use to determine the most common links in 200 tweets for example. What I want to do is to get the latest 200 tweets and then determine what are people talking about, I am sure that the tweets will contain links (because I will ask the twitter API to return tweets that contain links only) but I will also want to make sure that my code will understand that Two URLs are the same even if they have different bit.ly links.
What I am trying to do (this might make it easier for your guys to provide some help) is that i am trying to determine what is the most important subject people are talking about in these 200 tweets. I understand that people might be talking about the same story but provide different links, however, i am not sure if there is an easy way to understand that.
Links to examples, APIs, sample code, and any other ideas will be helpful :)
If you need more information to explain this please tell me and I will edit the question to include more information
Not that I know of, but you can accomplish this by..
Find all of the links in the list of tweets using a regex pattern.
Use the twitter search api to search for each link. The number of results is returned.
Manually sort the links by # of results returned.
Fundamentally you can get this from the api, first get the latest public timeline (this will be 100 tweets, if you need 200 then you need to request a cursor and create a loop that checks if the next_cursor value is greater than 0) and then build a spider that determines relevancy.
http://api.twitter.com/1/statuses/public_timeline.???
where ??? is json, xml, rss or atom
If you want to determine the popularity of words then dump all the text into a string and then split it on spaces, punctuation etc, discard non-nouns, sort it and create a dictionary variable with the words and the count of the words.
If you want to determine the popularity of links then it is the same process but with an extra step to do a web request on each link to determine the ultimate link destination.
Building on what others say, you can use twitter search to get the tweets no problem and I wont go into that part in this answer.
A possible route for the short links:
You could, for example, goto bit.ly and create a custom short link for the url you are wanting to keep track of. Using that link if you add a + to the end of the url you will get link stats. example: http://bit.ly/tweelay+ Additionally, bit.ly keeps track of other short links that point to the same url. Which you could then use in your searches.
using bit.ly /stats API you can get a list of the shorten urls.
depending on the urls you are trying to keep track of you may have access to referral logs. (i.e. your own website) Using your referral log you may also be able to find additional short urls that you can use to search.