From: Sajjad Seyyed on
Hi

i wanna write simple code like this :

puts "Please Enter you word for search in Google.com:"
x=gets
{
}


please help me what should i do ?

any simple code anyone has please put here for me
or any information has please tell me


thank you so mach
--
Posted via http://www.ruby-forum.com/.

From: Eustáquio Rangel on
2010/2/19 Sajjad Seyyed <treep_ir(a)yahoo.com>:
> Hi
> i wanna write simple code like this :
> puts "Please Enter you word for search in Google.com:"
> x=gets

If you just want that Google spits the HTML result, you can use something like

require "open-uri"

puts "Please Enter you word for search in Google.com:"
puts open("http://www.google.com/search?q="+gets.split.join("+")).read

From: Sajjad Seyyed on
Eustáquio Rangel wrote:
> 2010/2/19 Sajjad Seyyed <treep_ir(a)yahoo.com>:
>> Hi
>> i wanna write simple code like this :
>> puts "Please Enter you word for search in Google.com:"
>> x=gets
>
> If you just want that Google spits the HTML result, you can use
> something like
>
> require "open-uri"
>
> puts "Please Enter you word for search in Google.com:"
> puts open("http://www.google.com/search?q="+gets.split.join("+")).read

no i wanna just show me result link

pleaseee hellppppppp meeeeeee

i neeedddddddddddddddddddd
--
Posted via http://www.ruby-forum.com/.

From: Eustáquio Rangel on
> no i wanna just show me result link
> pleaseee hellppppppp meeeeeee

What result link? You can have thousands of links on the search result.

From: Sajjad Seyyed on
Eustáquio Rangel wrote:
>> no i wanna just show me result link
>> pleaseee hellppppppp meeeeeee
>
> What result link? You can have thousands of links on the search result.

see here :
http://www.google.co.in/#hl=en&source=hp&q=Ruby&btnG=Google+Search&meta=&aq=f&oq=Ruby&fp=e24c1ca3843ba2b2

i wanna just show me result of link

pleaseeeeeeeeeeeeee
--
Posted via http://www.ruby-forum.com/.