Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

calling and listing cgi's

0 views
Skip to first unread message

Eric Osman

unread,
Feb 21, 2003, 11:10:30 AM2/21/03
to

This is sort of 2 questions in 1:

The first is the simpler question.

If you look at the source for a web page such as m-w.com you see
that when it actually looks up your word, it invokes

/cgi-bin/dictionary

Suppose instead of invoking that cgi, you wanted to see the source
code (assuming it wasn't intentionally protected against you) .

What would you type in order to achieve this ?

The second question is, once you know that m-w.com invokes
/cgi-bin/dictionary , is it possible to determine how to invoke it
to look up a word directly instead of having to type the word into
the form ?

For example, suppose I typed the word "swashbuckler" into the form and
clicked "look it up".

But now suppose I want to do the lookup directly. Something like

/cgi-bin/dictionary?word=swashbuckler

The question is, how to determine exactly what that syntax should be.

Thanks. /Eric eric...@rcn.com


--
PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
SELF-MODERATED newsgroup. aa.net and boutell.com are
NOT the originators of the articles and are NOT responsible
for their content.

HOW TO POST to comp.infosystems.www.authoring.cgi:
http://www.thinkspot.net/ciwac/howtopost.html

Michael Budash

unread,
Feb 21, 2003, 12:33:27 PM2/21/03
to
In article <3E564F7...@rcn.com>, Eric Osman <eric...@rcn.com>
wrote:

> This is sort of 2 questions in 1:
>
> The first is the simpler question.
>
> If you look at the source for a web page such as m-w.com you see
> that when it actually looks up your word, it invokes
>
> /cgi-bin/dictionary
>
> Suppose instead of invoking that cgi, you wanted to see the source
> code (assuming it wasn't intentionally protected against you) .
>
> What would you type in order to achieve this?

can't do it. the webserver is configured to execute files in that
directory. period.

> The second question is, once you know that m-w.com invokes
> /cgi-bin/dictionary , is it possible to determine how to invoke it
> to look up a word directly instead of having to type the word into
> the form?
>
> For example, suppose I typed the word "swashbuckler" into the form and
> clicked "look it up".
>
> But now suppose I want to do the lookup directly. Something like
>
> /cgi-bin/dictionary?word=swashbuckler
>
> The question is, how to determine exactly what that syntax should be.

you were close. IN THIS CASE, looking at the html tells me that this
might work:

http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=swashbuckler

and it does. but it might not have. if the 'dictionary' script only
looked at parameters passed to it via the 'POST' method, it would be as
if it was called with *no* parameters, upon which it (currently) shows
only a page with no content at all. it appears, however, that the script
also looks at parameters passed to it via the 'GET' method, so it works.

hth-

Randall Bart

unread,
Feb 25, 2003, 8:23:06 PM2/25/03
to
'Twas Fri, 21 Feb 2003 17:33:27 GMT when all
comp.infosystems.www.authoring.cgi stood in awe as Michael Budash
<mbu...@sonic.net> uttered:

>> But now suppose I want to do the lookup directly. Something like
>>
>> /cgi-bin/dictionary?word=swashbuckler
>>
>> The question is, how to determine exactly what that syntax should be.
>
>you were close. IN THIS CASE, looking at the html tells me that this
>might work:
>
> http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=swashbuckler

That works, but so does this:

http://www.m-w.com/cgi-bin/dictionary?swashbuckler

You are right that it works because it happens to be set up that way.
Yours was the immediate first guess based on reading the HTML and hoping
that POST and GET parameters are handled the same way; mine is the result
of tinkering with URLs seeing what works. If you spend some time on the
Merriam-Webster site, you'll find some of their links use GET also.

--
RB |\ © Randall Bart
aa |/ ad...@RandallBart.spam.com Bart...@att.spam.net
nr |\ Please reply without spam I LOVE YOU 1-917-715-0831
dt ||\ http://RandallBart.com/ DOT-HS-808-065 MS^7=6/28/107
a |/ Play http://sky.4r.st Ånåheim Ångels 2002 World Chåmps!
l |\ An injustice anywhere is a threat to justice everywhere
l |/ Whither Justice: http://www.mapinc.org/people/Ed+Rosenthal

0 new messages