Solved

to search (in a way)

Posted on 1999-01-28
9
175 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
  • 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
 

Author Comment

by:paddytsr
ID: 1832442
and also how exactly do you do it for multiple search engines.....
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

867 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now