以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  建议:狐表增加一个功能,不需要其他平台可以直接发短信。  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=21622)

--  作者:lihe60
--  发布时间:2012/7/19 10:28:00
--  建议:狐表增加一个功能,不需要其他平台可以直接发短信。

狐表可以直接发邮件;建议增加直接发送信息到手机的功能,不需要其他平台。


--  作者:olivetchan
--  发布时间:2012/7/19 10:31:00
--  

邮件服务器可以自己搞,也可以SMTP!

短信怎么收钱?不可能免费给你发,还有有些正规服务商为了不产生垃圾短信,内容是有落款的,落谁的款?


--  作者:olivetchan
--  发布时间:2012/7/19 10:48:00
--  

开发指南中我发现使用了xmlhttp,依赖它(msxml.dll)还不如依赖.NET的WebRequest

以下内容为程序代码:

1 \'\'\'HttpPost
2 Dim myReq As Net.WebRequest
3 Dim myUri As New Uri(args(0))
4 myReq =Net.WebRequest.Create(myUri)
5 myReq.C
6 myReq.Method = "POST"
7 Dim bytes() As Byte
8 bytes = Encoding.UTF8.GetBytes(args(1))
9 Dim os As IO.Stream
10 os=Nothing
11 try
12 myReq.ContentLength = bytes.Length
13 os = myReq.GetRequestStream()
14 os.Write(bytes, 0, bytes.Length)
15 catch
16 Return "ERR_POST_REQ"
17 finally
18 If not os Is Nothing Then
19 os.Close()
20 End If
21 End try
22 try
23 Dim myResp As NET.WebResponse = myReq.GetResponse()
24 If myResp Is Nothing Then
25 Return "Err"
26 Else
27 Dim sr As IO.Stream = myResp.GetResponseStream()
28 Dim rs As New IO.StreamReader(sr, System.Text.Encoding.GetEncoding("utf-8"))
29 Dim read(256) As [Char]
30 Dim count As Integer = rs.Read(read, 0, 256)
31 Dim s As String
32 While count > 0
33 Dim str As New [String](read, 0, count)
34 s=s+str
35 count = rs.Read(read, 0, 256)
36 End While
37 Return s
38 End If
39 catch
40 Return "ERR_POST_RES"
41 End try
42
43
44 \'\'\'HttpGet
45 Dim myReq As Net.WebRequest
46 Dim myUri As New Uri(args(0))
47 myReq =Net.WebRequest.Create(myUri)
48 myReq.Timeout = args(2)
49 try
50 Dim webResponse As NET.HttpWebResponse= myReq.GetResponse()
51 If webResponse Is Nothing Then
52 Return "Err"
53 Else
54 Dim Charset As String ="utf-8"
55 If args(1)<>"" Then
56 Charset=args(1)
57 End If
58 Dim sr As IO.Stream = webResponse.GetResponseStream()
59 Dim rs As New IO.StreamReader(sr, System.Text.Encoding.GetEncoding(Charset))
60 Dim read(256) As [Char]
61 Dim count As Integer = rs.Read(read, 0, 256)
62 Dim s As String
63 While count > 0
64 Dim str As New [String](read, 0, count)
65 s=s+str
66 count = rs.Read(read, 0, 256)
67 End While
68 Return s
69 End If
70 catch
71 Return "ERR_POST_RES"
72 End try
73


--  作者:lihe60
--  发布时间:2012/7/19 11:09:00
--  
以下是引用muhua在2012-7-19 10:34:00的发言:

狐表有短信发送的功能,请查看“开发指南”中的“短信收发”章节

 

可以参考下:http://www.foxtable.com/help/topics/2243.htm

 

这个我知道,要借助其他的平台的。


--  作者:lihe60
--  发布时间:2012/7/19 11:12:00
--  
以下是引用olivetchan在2012-7-19 10:48:00的发言:

开发指南中我发现使用了xmlhttp,依赖它(msxml.dll)还不如依赖.NET的WebRequest

以下内容为程序代码:

1 \'\'\'HttpPost
2 Dim myReq As Net.WebRequest
3 Dim myUri As New Uri(args(0))
4 myReq =Net.WebRequest.Create(myUri)
5 myReq.C
6 myReq.Method = "POST"
7 Dim bytes() As Byte
8 bytes = Encoding.UTF8.GetBytes(args(1))
9 Dim os As IO.Stream
10 os=Nothing
11 try
12 myReq.ContentLength = bytes.Length
13 os = myReq.GetRequestStream()
14 os.Write(bytes, 0, bytes.Length)
15 catch
16 Return "ERR_POST_REQ"
17 finally
18 If not os Is Nothing Then
19 os.Close()
20 End If
21 End try
22 try
23 Dim myResp As NET.WebResponse = myReq.GetResponse()
24 If myResp Is Nothing Then
25 Return "Err"
26 Else
27 Dim sr As IO.Stream = myResp.GetResponseStream()
28 Dim rs As New IO.StreamReader(sr, System.Text.Encoding.GetEncoding("utf-8"))
29 Dim read(256) As [Char]
30 Dim count As Integer = rs.Read(read, 0, 256)
31 Dim s As String
32 While count > 0
33 Dim str As New [String](read, 0, count)
34 s=s+str
35 count = rs.Read(read, 0, 256)
36 End While
37 Return s
38 End If
39 catch
40 Return "ERR_POST_RES"
41 End try
42
43
44 \'\'\'HttpGet
45 Dim myReq As Net.WebRequest
46 Dim myUri As New Uri(args(0))
47 myReq =Net.WebRequest.Create(myUri)
48 myReq.Timeout = args(2)
49 try
50 Dim webResponse As NET.HttpWebResponse= myReq.GetResponse()
51 If webResponse Is Nothing Then
52 Return "Err"
53 Else
54 Dim Charset As String ="utf-8"
55 If args(1)<>"" Then
56 Charset=args(1)
57 End If
58 Dim sr As IO.Stream = webResponse.GetResponseStream()
59 Dim rs As New IO.StreamReader(sr, System.Text.Encoding.GetEncoding(Charset))
60 Dim read(256) As [Char]
61 Dim count As Integer = rs.Read(read, 0, 256)
62 Dim s As String
63 While count > 0
64 Dim str As New [String](read, 0, count)
65 s=s+str
66 count = rs.Read(read, 0, 256)
67 End While
68 Return s
69 End If
70 catch
71 Return "ERR_POST_RES"
72 End try
73

这个代码拷到命令窗口不执行,如何使用?


--  作者:程兴刚
--  发布时间:2012/7/19 11:30:00
--  
发短信可不是发邮件,没有免费的服务商!
--  作者:olivetchan
--  发布时间:2012/7/19 11:42:00
--  
很显然它是两个自定义函数
--  作者:lihe60
--  发布时间:2012/7/19 11:53:00
--  
以下是引用程兴刚在2012-7-19 11:30:00的发言:
发短信可不是发邮件,没有免费的服务商!

这个原理我不懂:发短信和发邮件的区别。


--  作者:程兴刚
--  发布时间:2012/7/19 12:52:00
--  
发短信需要移动通讯运营商的支持,您看见联通、移动、电信等运营商有免费的吗?
--  作者:lihe60
--  发布时间:2012/7/19 13:00:00
--  
以下是引用程兴刚在2012-7-19 12:52:00的发言:
发短信需要移动通讯运营商的支持,您看见联通、移动、电信等运营商有免费的吗?

发邮件,没有运营商也是发不出去的。