Solved

to search (in a way)

Posted on 1999-01-28
9
195 Views
Last Modified: 2013-12-25
i want to make it so that i can enter a word into a
text box and then hit a button "search" and then that
will go to a given search engine (say yahoo.com) and
it will give me the relevant results

so its just like searching directly on the search engine
but doing it from my page...

thanks
paddy
0
Comment
Question by:paddytsr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
9 Comments
 
LVL 7

Expert Comment

by:jconde
ID: 1832439
Hi, that's pretty simple.....if there's only one search engine you will be using....what you need to do, is to call yahoos search cgi, and send the correct parameters.

I.e (THis goes in your html template)
<FORM ACTION="http://search.yahoo.com/bin/search">
<INPUT TYPE="TEXT" NAME="p">
<INPUT TYPE="SUBMIT" VALUE="SEARCH">
</FORM>

If you want to have multiple search engines that one can choose from, you will need to do the same, but with a CGI that will redirect to the selected search engine with it's parameters.

Regards,

Jorge
0
 

Author Comment

by:paddytsr
ID: 1832440
thanks,
theres just one more thing that id like to know if its possible to do...

when i search www.yahoo.de (the german yahoo) for a word say "test" i get a lot of links and some sentences beside some links with a sentence containing the word "text"

Is it possible to just get a list of these sentences with the word searched for when u hit search for the word?

Thanks
Paddy
0
 

Author Comment

by:paddytsr
ID: 1832441
Adjusted points to 55
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

Author Comment

by:paddytsr
ID: 1832442
and also how exactly do you do it for multiple search engines.....
0
 
LVL 7

Accepted Solution

by:
jconde earned 60 total points
ID: 1832443
What do you mean by a List of sentences that contain the searched word???.....do you mean, in order for you to display the results with your own html format?

To search multiple search engines it's quite tricky!

I will give you the algorithm of what you need:

1) Receive the search string and the search engine that will be used
2) Open a socket to the search engine
3) Send the path and parameters to the search engines httpd
4) While (Not end of socket stream)
5) Print the contents of the socket stream
6) Close the socket.

If you do this, since you have complete control over the html before it's printed out on the browser, you can format the html to your convenience.

P.S.  No need to reject my answer, I would have still helped you all the way through.
0
 

Author Comment

by:paddytsr
ID: 1832444
Yeah, i want to display the results with my own html format... in a way just "real life" examples of how the word appears in
various sentences...

can you be any more precise on the algorithm for multiple search
engines, i'm new to all this and dont have a clue how to go about writing the code....

sorry about the rejected answer, im new to this site too
thanks
paddy
0
 
LVL 7

Expert Comment

by:jconde
ID: 1832445
What httpd are you using??...

I have some samples that do pretty much what you're looking for but they're written with php3.....will it work for you?
0
 

Author Comment

by:paddytsr
ID: 1832446
what is php3?
paddy

0
 

Author Comment

by:paddytsr
ID: 1832447
i am using an apache server on unix...
and im new to it, i only know the basics
paddy
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question