Perl

From CDYNE Wiki
Jump to navigation Jump to search
 1  #!/usr/local/bin/perl
 2  #
 3  # Welcome to PCallAPhoneBasic powered by CDYNE 
 4  # Written by Blake J. Wischer
 5  # This program uses the CDYNE service to call the
 6  # phone number entered and say the text entered
 7  # Kelvin temperature units.
 8  #
 9  # Written: July 26, 2006.
10  #
11  # PCallAPhoneBasic falls under the GNU General Public License. 
12  
13  print "Welcome to PCallAPhoneBasic powered by CDYNE\n";
14  print "\n";
15  print "PCallAPhoneBasic Version 1\n";
16  print "Copyright (C) 2006 Blake Wischer\n";
17  print "PCallAPhoneBasic comes with\n";
18  print "ABSOLUTELY NO WARRANTY. Licensed under\n";
19  print "The GNU General Public License version 2\n";
20  print "This is free software, and you are\n";
21  print "welcome to redistribute it under the\n";
22  print "conditions of the GNU GPL.\n";
23  print "\n";
24  print "Phone Number to Dial:\n";
25  $phonenumber = <STDIN>;
26  print "\n";
27  print "Text to Say:\n";
28  $text = <STDIN>;
29  print "\n"; 
30  print "License Key (Use 0 to Test):\n";
31  $license = <STDIN>;
32  use LWP::Simple;
33  $page = get "http://ws.cdyne.com/NotifyWS/phonenotify.asmx/NotifyPhoneEnglishBasic?PhoneNumberToDial=$phonenumber&TextToSay=$text&LicenseKey=$license";
34  print $page;