看板FreeBSD
标 题Re: 请问FreeBSD 能发送 SMS 吗?
发信站成大计中BBS (Sun Jun 5 09:55:48 2005)
转信站ptt!ctu-reader!ctu-peer!Spring!news.nctu!news.nsysu!news.mksh.phc!news
※ 引述《[email protected] (悸动)》之铭言:
: ※ 引述《[email protected] (doremi)》之铭言:
: > 哦哦我正是需要这种东西(可以用perl 发)
: > 谢谢你罗...
: 挡人财路虽然不是什麽好事情,不过我还是要丢出来 :p
: 透过 PChome 的一元简讯发:
DrakKiller您好,那请问网页html的form该怎麽写呢?还有,0912345678和0934567890
还有'嗨嗨'这三个栏位分别代表啥意思呢?谢谢!
: #!/usr/bin/perl
: use WWW::Mechanize;
: use strict;
: &sendsms('PChome account', 'PChome password', 'SMS password', '0912345678,0934567890', '嗨嗨');
: sub sendsms
: {
: my ($username, $password1, $password2, $receiver, $msg) = @_;
: my $agent = WWW::Mechanize->new();
: $agent->agent_alias('Windows IE 6');
: $agent->get('http://sms.pchome.com.tw/front_end/sms');
: $agent->form_number(1);
: $agent->field('fuid', $username);
: $agent->field('pwd', $password1);
: $agent->submit();
: $agent->form_number(2);
: $agent->field('InputMsg', $msg);
: my $num = 0;
: foreach my $phone_number (split(/,+/, $receiver)) {
: $agent->field(sprintf('mobile%02d', ++$num), $phone_number);
: }
: $agent->submit();
: $agent->field('auth_code', $password2);
: $agent->current_form()->action('https://ezpay.pchome.com.tw/auth_form_do');
: $agent->submit();
: }
--
㊣Origin:《
成大计中 BBS 站 》[bbs.ncku.edu.tw] 来源:[218-172-81-156.dynamic]