Google Search

  • 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.

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(“Google” + inputText);
}

Google also provides free logos for use on your site.

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.

is this an question ? or do you just like it to share with us ? :slight_smile:

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 --)

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

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

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*+"+";
	}
	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

it seemed to work with the spaces left in

theres a thread in best of called “?Google Search?”