查詢bulletin visa

來源: peter2006 2006-07-14 14:40:56 [] [舊帖] [給我悄悄話] 本文已被閱讀: 次 (1365 bytes)
原程序如下:

#!/usr/bin/perl

use Sybase::DBlib;
use Net::SMTP;
use Mail::Sender;
use HTTP::Lite;
use MIME::Base64;

#use HTTP::ProxySelector;
#use LWP::UserAgent;




my $counter=0;

while($counter<100){

$http = new HTTP::Lite;
$http->proxy('proxy.***.com:8180');
$encoded = encode_base64('user1:user1password');
$http->add_req_header("Authorization", $encoded);


$req = $http->request("http://travel.state.gov/visa/frvi/bulletin/bulletin_1770.html")
or die "Unable to get document: $!";
my $content=$http->body();

if($content =~ /July 2006/){

print 'Yes';

my $sender = new Mail::Sender {smtp => 'mail.***.com', from => 'visalooker@***.com', auth => 'LOGIN',
authid => 'user1',authpwd => 'uuser1password',};
$sender->MailFile({to => 'xyz@***.com', subject => "July 2006 Visa is avaiable",
msg => " ",
file => 'message.txt'});

exit 0;

}

sleep 60;
$counter ++;

}



my $sender = new Mail::Sender {smtp => 'mail.***.com', from => 'visalooker@***.com', auth => 'LOGIN',
authid => 'user1',authpwd => 'uuser1password',};
$sender->MailFile({to => 'xyz@***.com', subject => "No July 2006 Visa is avaiable today",
msg => " ",
file => 'message.txt'});

所有跟帖: 

I am running my program to automatically check... -peter2006- 給 peter2006 發送悄悄話 (0 bytes) () 07/14/2006 postreply 14:42:14

They might have put a wrong link. Does your program -n3v4- 給 n3v4 發送悄悄話 (65 bytes) () 07/14/2006 postreply 15:09:38

你在查7月的,要改成8月了 -thingumajig- 給 thingumajig 發送悄悄話 (28 bytes) () 07/14/2006 postreply 15:40:53

請您先登陸,再發跟帖!

發現Adblock插件

如要繼續瀏覽
請支持本站 請務必在本站關閉/移除任何Adblock

關閉Adblock後 請點擊

請參考如何關閉Adblock/Adblock plus

安裝Adblock plus用戶請點擊瀏覽器圖標
選擇“Disable on www.wenxuecity.com”

安裝Adblock用戶請點擊圖標
選擇“don't run on pages on this domain”