PDA

View Full Version : Google Search



Clown Staples
June 16th, 2003, 08:56 AM
From a PM:


I'm glad you're interested. Actually it was much simpler than you would think. Its mostly the way google is set up that makes it so easy. I just happened to notice that the url for a google search is always the same except for the search variables at the end.
http://www.google.com/search?q=anything+you+want+here
So all I did was to add a textfield to get the variable to put on the end of the URL. (And a button to press)

on(press){
getURL("http://www.google.com/search?q=" + inputText);
}

Google also provides free logos for use on your site.
http://www.google.com/stickers.html
for anyone who wants to link there.

I'm sure the same thing would be possible using just javascript.
Hope this helps,

Clown

P.S. I am going to put this into a thread too in case any one else is interested.

RvGaTe
June 18th, 2003, 04:32 AM
is this an question ? or do you just like it to share with us ? :)

mlk
June 18th, 2003, 06:04 AM
hey that's quite cool actually - never thought of that.. i'll look if the other search engines behave the same way... (oh and you'll have to switch the blanks to + signs --)

Digitalosophy
June 19th, 2003, 01:23 AM
i just started a flash remoting tute that searches google and actually displays the results on your flash page. seems a little complcated but once the server is set up right , flash remoting isnt that hard

thoriphes
June 19th, 2003, 03:23 AM
yeah, that's how i search google now. i figured, if you're gonna type in your search in the box, you might as well go all the way and type the url automatically for example,

http://www.google.com/search?q=kirupa+forums

RvGaTe
June 19th, 2003, 07:34 AM
by the way, to make an flash string with the "+" instead of spaces, use this code:



searchGoogle = function (x) {
myText = x;
Words = myText.split(" ");
for (i=0; i<Words.length-1; i++) {
newText += Words[i]+"+";
}
newText += Words[Words.length-1];
googlestring = "http://www.google.com/search?q="+newText
getURL(googlestring,"_blank");
};

searchGoogle("Kirupa forums is the best!");


edit: now you have an function to search google

Clown Staples
June 19th, 2003, 10:34 AM
it seemed to work with the spaces left in

senocular
June 19th, 2003, 10:44 AM
theres a thread in best of called "?Google Search?"