[htdig] (Semi-off-topic)How do I Invoke Web-Page Processing from a Perl Script?


Subject: [htdig] (Semi-off-topic)How do I Invoke Web-Page Processing from a Perl Script?
From: Sphboc@aol.com
Date: Mon May 29 2000 - 19:01:34 PDT


I need to--from a Perl Script--send out exactly the same byte stream which a
browser would send. Intent being to invoke execution of a cgi script on the
server, and cause the output to be returned to the invoking Perl script.

It "has to" be similar to the to the following code, which I am currently
using to invoke htsearch from within a perl script. (with a fairly minor
variation in the value of $callstr).

If anyone has an idea (or a working example), please advise.
(Most of my testing, to date, returns "nothing" from the open/read
combination, without any Perl error indication).

=============================================================

$callste="format=$format&matchesperpage=$matchesperpage&words=$words";
print DNERR $callste ;
$callstr = "./htsearch.cgi" . "|";
$ENV{REQUEST_METHOD}="GET";
$ENV{QUERY_STRING}= $callste;

open (SOURCE,$callstr);
@lines = <SOURCE>;

Steven P Haver/602-242-9708

------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig-unsubscribe@htdig.org
You will receive a message to confirm this.



This archive was generated by hypermail 2b28 : Mon May 29 2000 - 16:51:19 PDT