Re: debian and MCI paging problem...

1998-01-28 Thread Jens B. Jorgensen


My advice to you is to not use their web interface. Somewhere they have
a dial-up number for a special modem connection which uses a protocol known
as IXO. Then all you need is a modem attached to the box which will be
sending the pages. I can give you the software which will send a page (it
even has a spooler). Then you can send pages with 'tpage someone "here's
a bunch of text"'. I've also got a web front end to this program which
I can send you (just a quick-hack perl cgi, I'm sure you could do better).

david oswald wrote:

Hello all...

Here's what I need to do. I have a Debian box and various processes
running on it that check various platforms (hp, aix...) for different
configurations that we monitor. Such as file system capacity... - once
we reach 95%, we want to send a page to the right guy/gal.

 I don't think this should be terribly difficult... You see we are
using MCI's paging service over the web already. We have taken this code
(java-script) and used it in house and created a little menu of
available persons to simplify the paging operation. HOWEVER this methods
requires manual intervention through someone's browser of choice.

 I have created a script providing the pin # and the message (which is
no problem) but HOW do I pass this information back to MCI to get it
processed if I'm not using a web based browser to fill in the message
fields. Is this something that I am over looking the obvious - I hope
so...

 I have provided the MCI Paging page
http://www.mci.com/connections/interact/sendpage/sendpage.shtml) , so
that you can get an idea of what I am dealing with, I hope I have made
it clear that it is our desire to automate the creation of the paging
operation through shells scripts, and NOT using a browser to fill in
these pages for us. I have also attached the _javascript_ (mci.htm) which
does some of this work for us but again it can only be used from a
browser.

I began to think something like telnet to www.mci.com:80 and interact
with it that way ?! I need some advice here...

Any help appreciated ... Thanx in advance...










Send
a Page







Employee:

(Select
an Employee Name)Last_name1, First_name1Last_name2,
First_name2Last_name3, First_name3Last_name4,
First_name4






Text Message
(maximum of 240 alpha-numeric characters for most
paging services)













--
Jens B. Jorgensen
[EMAIL PROTECTED]





Re: debian and MCI paging problem...

1998-01-28 Thread Daniel Martin at cush
david oswald [EMAIL PROTECTED] writes:

I have created a script providing the pin # and the message (which is
 no problem) but HOW do I pass this information back to MCI to get it
 processed if I'm not using a web based browser to fill in the message
 fields. Is this something that I am over looking the obvious - I hope
 so...

Two ideas; both depend on non-interactive ways to call lynx and have
it send form data.  Something like: (sorry about the long line)
  lynx -dump 
http://www.mci.com/cgi-bin/sendpage.cgi?pin=234567textMessage=this%20is%20a%20test%0D%0Asecond%20line.%0D%0A;

Will probably work.  Either that, or this little perl script that
calls lynx (there are probably Perl modules that'll do this for you,
but I couldn't find them).

#!/usr/bin/perl
use URI::Escape;
($pin, $message) = @ARGV;
open(LYNXOUT, 
|lynx -post_data http://www.mci.com/cgi-bin/sendpage.cgi;);
print LYNXOUT 'pin=', uri_escape($pin), 
  'textMessage=', uri_escape($message);

The difference between the two is that the long lynx line issues a GET 
request to the host, while the perl script has lynx issuing a POST
request.  The form as MCI has it causes the browser to issue a POST
command, though it shouldn't make any difference to the cgi program.

If you decide that you can use a get request, you may consider using
wget instead of lynx; I think it would be faster for you:
  wget -O - http://www.mci.com/blahblahblah;

All these commands will produce as output whatever the mci cgi script
spits back to the browser, so you may want to redirect output to
/dev/null.


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .