Lets say I want to make a program that goes to google and searches for a word, can I do that with c++ or do I need to learn some other language?
Lets say I want to make a program that goes to google and searches for a word, can I do that with c++ or do I need to learn some other language?
Why drink and drive when you can smoke and fly?
Yes.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
cool, thanks.
does anyone have a tutorial to get me started?
Why drink and drive when you can smoke and fly?
Yes it is possible in many ways. I guess the easiest off hand would be to use the system() function and just build the appropriate url in a string.
OS: Windows XP Pro CE
IDE: VS .NET 2002
Preferred Language: C++.
Check out the network programming board. There's a sticky there with some links and stuff...
"Think not but that I know these things; or think
I know them not: not therefore am I short
Of knowing what I ought."
-John Milton, Paradise Regained (1671)
"Work hard and it might happen."
-XSquared
Google offers code that can be obtained to make your own googleGUI. However, you must contact them and provide some valid intentions on using it for valid reasons and they will give you a coveted developer's key, which is needed to perform out-of-browser queries, I believe. Examine how google's code works, man! Its easy! lets learn:
http://www.google.com/search?q
=dog&sourceid=opera&num=0&ie=utf-8&oe=utf-8
Okay. First the <http://www.> This specifies that a complete address for a URL
Second <google.com> This is the website
Third </search?q=> this specifies that a search is requested and the "q=" is "query="
Fourth <dog> is what was searched for
Fifth <&sourceid=opera> This is asking where the query is coming from so the scripts know how to return the response
Sixth <&num=0&ie=utf-8&oe=utf-8> Forgot what most of this meant but I know it deals with the UFT-8 encoding...
Most of the important parts are covered now just build and WIN32 app with some values and strings and and send through a WIN32 control (easiest for me) and you're done. If you want to return the results directly to your program...ask and you shall recieve (but not from me)
***REQUESTING A MODDY TO MOVE THIS TO ANTOHER BOARD
Weeel, itss aboot tieme wee goo back too Canada, eeehy boyss.
Mhm, First off all.. Easiest way for a beginner is just to study how the Google requests work as jinx made a good example off. Then when you know the basics, only to search normal as you wanted. You get alot of choises to do the request on. Some of those choices is:
1. WinSock/Socket programming (Socket programming)
2. Using browser for opening the page
In the first choice (WinSock/Socket programming) you should learn how to use sockets and how to operate with them in your operating system. If you've Windows you should read about WinSock. Not hard only some simple initializing and outilazing functions. (WSACleanup(), WSAStartup()..)
In the second example I would just use some simple code as ShellExecute in win32 or execv() in Linux.. Check up some great programming tutorials to get to work.. And I could give you some examples if you want.. ([email protected])
Regards,
Prof. Simen Pisal Kier @ UiO
Actually this is two parts. http:// defines the protocol to use. www specifies to use the www subdomain on the host. If you wanted to break it up even more http specifies the protocol and // specifies a computer outside of your network.First the <http://www.> This specifies that a complete address for a URL
Google Hacks projects
Google Hacks Book
The last one has some nifty samples to play around with but I think that most of them are in a web-oriented language (php, html, etc.) Hope it helps.
P.S. I got the book at my library and read through it an was pretty impressed. You should make a point of checking it out.
Weeel, itss aboot tieme wee goo back too Canada, eeehy boyss.
If you want to be even more picky the "www" doesn't specify a subdomain it specifies a DNS host record :POriginally Posted by Thantos
C/C++ Support IRC Channel
Server: irc.dal.net Channel: #csupport
Come along and help make it a great resource for the community.
How about we recognize that all of us are smart and don't need to be picky? Thank you.
As far as this topic goes, Google API seems quite good. I will have a look at it myself when I have some free time ^_^
OS: Windows XP Pro CE
IDE: VS .NET 2002
Preferred Language: C++.