"Im feeling lucky"

admin

Administrator
Staff member
This is probably a simple question, but how can I use google's "I'm feeling lucky" function instead of just its search function in a script I make?<!--content-->Do you need it so it's server side???<!--content-->Doesn't really matter, I just need to be able to take input and use google's Im feeling luck functionality with it.<br />
<br />
For example: take input from form, execute "I'm feeling lucky" on the input (which will go to the first page returned from the results).<!--content-->I'd imagine you'd have<br />
<br />
<form action="http://www.google.com/search" name=f> (for your form)<br />
<br />
and use something like this for your button:<br />
<input type=submit value="I'm Feeling Lucky" name=btnI><!--content-->Thanks... does btnI or f or what tell google to run "I'm feeling lucky" instead of just a search?<!--content-->Yes, the btnI tells google to go to the very first page.<br />
<br />
<form action="http://www.google.com/search" name=f><br />
<input maxLength=256 size=55 name=q value=""><br />
<input type=submit value="I'm Feeling Lucky" name=btnI><br />
</form><br />
<br />
Will do a I'm feeling lucky search - while<br />
<br />
<form action="http://www.google.com/search" name=f><br />
<input maxLength=256 size=55 name=q value=""><br />
<input type=submit value="I'm Feeling Lucky"><br />
</form><br />
<br />
will do a normal search.<br />
<br />
BTW if your trying to find something like that, go to a page that has it (google in this case) and hit View -> Source<!--content-->Ah okay. Thanks for all the help!<!--content-->close, a normal search uses "name=btnG" instead.<!--content-->Originally posted by scoutt <br />
close, a normal search uses "name=btnG" instead. <br />
<br />
Oh okay.<br />
<br />
Well the "product" can be seen at <!-- m --><a class="postlink" href="http://bellaire.org/stuff/cool2.php">http://bellaire.org/stuff/cool2.php</a><!-- m --><br />
<br />
*DISCLAIMER* I'm not responsible for anything you Download <!--more--> illegally :).<!--content-->Originally posted by scoutt <br />
close, a normal search uses "name=btnG" instead. That is true, but what I said is still right...try it<form action="http://www.google.com/search" name=f><br />
<input maxLength=256 size=55 name=q value=""><br />
<input type=submit value="I'm Feeling Lucky"><br />
</form> :)<!--content-->
 
Top