HP3000-L Archives

February 2001, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Burgess Peter <[log in to unmask]>
Reply To:
Burgess Peter <[log in to unmask]>
Date:
Fri, 23 Feb 2001 13:37:20 -0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (64 lines)
Hi

I have tried using this on one of my pages on the hp and this works but when
I try to connect to another server the process hangs for a while and nothing
is populated in the file. Where can I get information on how to locate
returned errors by this function and does anyone know what the limitations
of this function are , this is the command I am using in case of any typoes
I may have made.

#!/PERL/PUB/perl
use LWP::Simple;

$webpage =
get('http://web.domain.com/xml/xmlo.asp?field1=nnnnn&field2=nnnnnn');
open(webp , ">/PERL/PUB/webp");
print webp  $webpage;
close(webp);

Regards

Peter

-----Original Message-----
From: Mark Bixby [mailto:[log in to unmask]]
Sent: 21 February 2001 17:19
To: [log in to unmask]
Subject: Re: Testing Webserver Availability


Steven Waters wrote:
>
> I am looking for a way to test the availability of our webserver from a
> batch job on the HP3000. I was using Telnet online to access the webserver
> on port 80 and then typing the http commands and waiting for the webserver
> to respond. This worked great. Unfortunately Telnet does not run in batch.
>
> The commands I was entring were:
>
> GET /cgi-bin/webtest HTTP/1.1
> Host: www.cannex.com
> Accept: */*
>
> Does anyone have a method, without having to write a program in a 3GL,
that
> would accomplish this simple task.

You could do this with 3 lines of Perl:

#!/PERL/PUB/perl
use LWP::Simple;
$webpage = get('http://www.cannex.com/cgi-bin/webtest');

This reads the entire contents of the web page into the variable $webpage.

Perl also supports doing telnet from batch jobs.  One example (and there are
others in the HP3000-L archives) can be found at:

        http://raven.utc.edu/cgi-bin/WA.EXE?A2=ind0008B&L=hp3000-l&P=R19092

Perl can be downloaded from http://www.bixby.org/mark/perlix.html.
--
[log in to unmask]
Remainder of .sig suppressed to conserve scarce California electrons...

ATOM RSS1 RSS2