About | NetLify | NeoCities | Project | TEST | 管理

<<WEBCLM.OCX(OCX迷你應用程式嵌入式網站伺服器)>>

WEBCLM說明:

一個基於 MSWINSCK.OCX 引擎所發展的迷你<<網站伺服器>>,已封裝成OCX物件,容量小於 300KB,提供以下功能:

1. WEB指令模式(預設)

2. 內嵌網頁功能(關閉WEB指令模式)

3. 允許使用外掛靜態外部網頁(支援htm/ html/ css/ js/ jpg/ jpeg/ gif/ png/ ... 等)

4. 支援 CGI 架構開發(支援GET)

5. WEB模式內建 BASE/ MD5/ EX_MD1 三種預設登入方式

6. 內嵌圖檔功能(支援JPEG)

7. 內建 aes.js/ ex_md1.js/ cookie.js/ default_sack.js/ qrcode.js/ base64.js 等常用 JavaScript

8. 支援所有 Windows COM 架構的所有程式語言

9. 通過防毒軟體測試

10. 支援 Header CORS 控制

 

WEBCLM適用:

Microsoft Windows 95

Microsoft Windows 98

Microsoft Windows NT

Microsoft Windows XP (32/ 64)

Microsoft Windows 2000 (32/ 64)

Microsoft Windows 2003 Server (32/ 64)

Microsoft Windows Vista (32/ 64)

Microsoft Windows 7 (32/ 64)

Microsoft Windows 2008 Server (32/ 64)

Microsoft Windows 8.0 (32/ 64)

Microsoft Windows 2012 Server (32/ 64)

Microsoft Windows 8.1 (32/ 64) (32/ 64)

Microsoft Windows 2012 R2 Server (32/ 64)

Microsoft Windows 10 (32/ 64)

Microsoft Windows 2016 Server (32/ 64)

Microsoft Windows 11

Microsoft Windows 2019 Server

Microsoft Windows 2021 Server

 

WEBCLM下載:

元件、說明文件下載(webclm1092.7z)

 

WEBCLM教學:

HELLO

Private Sub Form_Load()

Me.WebClm1.ListenPort = 82
Me.WebClm1.Listen
Me.WebClm1.CloseDefaultPage Index_html

End Sub

Private Sub WebClm1_PageStringReturn(Address As String, data As String, IP As String, HeaderData As String, File As Variant, Index As Integer)

Me.WebClm1.SetEventPageSendString Index, "<h1>Hello</h1>"

End Sub

 

使用WEBCLM內建的EX_MD1登入介面

Private Sub Form_Load()

WebClm1.WebDefaultPage = "webclm_default_login_ex_md1.html"

'https://jplop.neocities.org/teac_ex_md1
'12345 ex_md1 = FART37aRTDQu3AjLLtDTnHGHH8uEjMuGTimHEyTyG

Me.WebClm1.LoginPassword_For_PasswordEX_MD1 = "FART37aRTDQu3AjLLtDTnHGHH8uEjMuGTimHEyTyG"

Me.WebClm1.ListenPort = 82
Me.WebClm1.Listen

End Sub

Private Sub WebClm1_PageStringReturn(Address As String, data As String, IP As String, HeaderData As String, File As Variant, Index As Integer)

If (Address = "/webclm_deflogin_getpassword.php") Then

'https://jplop.neocities.org/teac_ex_md1
'12345 ex_md1 = 827ccb0eea8a706c4c34a16891f84e7b
If Me.WebClm1.Request("pass", data) = "FART37aRTDQu3AjLLtDTnHGHH8uEjMuGTimHEyTyG" Then

Me.WebClm1.SetEventPageSendString Index, "PASSWORD IS TRUE"

Else

Me.WebClm1.SetEventPageSendString Index, "PASSWORD IS FALSE"

End If

End If

End Sub

 

WEBCLM取得 GET 資料

Private Sub Form_Load()

'http://127.0.0.1:82/?n=test
Me.WebClm1.CloseDefaultPage Index_html
Me.WebClm1.ListenPort = 82
Me.WebClm1.Listen

End Sub

Private Sub WebClm1_PageStringReturn(Address As String, data As String, IP As String, HeaderData As String, File As Variant, Index As Integer)

Me.WebClm1.SetEventPageSendString Index, "Data: " & Me.WebClm1.Request("n", data)

End Sub

 

WEBCLM取得瀏覽器客戶端資訊

Private Sub Form_Load()

Me.WebClm1.ListenPort = 82
Me.WebClm1.Listen
Me.WebClm1.CloseDefaultPage Index_html

End Sub

Private Sub WebClm1_PageStringReturn(Address As String, data As String, IP As String, HeaderData As String, File As Variant, Index As Integer)

Me.WebClm1.SetEventPageSendString Index, "<h1>" & Me.WebClm1.GetHeader(Host, HeaderData) & "</h1>" & _
"<h1>" & Me.WebClm1.GetHeader(User_Agent, HeaderData) & "</h1>" & _
"<h1>" & Me.WebClm1.GetHeader(Referer, HeaderData) & "</h1>"

End Sub

 

WEBCLM取得內建JS檔案

Private Sub Form_Load()

Me.WebClm1.ListenPort = 82
Me.WebClm1.Listen
Me.WebClm1.CloseDefaultPage Index_html

End Sub


Private Sub WebClm1_PageStringReturn(Address As String, data As String, IP As String, HeaderData As String, File As Variant, Index As Integer)

If (Address = "/index.html") Then

Me.WebClm1.SetEventPageSendString Index, "<script src=/aes.js></script>" & _
"<script src=/ex_md1.js></script>" & _
"<script src=/cookie.js></script>" & _
"<script src=/default_sack.js></script>"

End If

End Sub

 

WEBCLM顯示來源 IP

Private Sub Form_Load()

Me.WebClm1.ListenPort = 82
Me.WebClm1.Listen

End Sub

Private Sub WebClm1_CommandStringReturn(Command As String, LoginType As Boolean, IP As String, Index As Integer)

If Command = "myip" Then

WebClm1.SetEventCommandSendString Index, "<br><br> You IP: " & IP & " <br><br>"

End If

End Sub

 

WEBCLM讀取外部檔案

Private Sub Form_Load()

Me.WebClm1.ListenPort = 82
Me.WebClm1.Listen
Me.WebClm1.Webclm_HoemPage_BaseDiskPath = App.Path & "\"
Me.WebClm1.UserDesignPage Index_html, "<h1><a href=test.html>link external file</a></h1>"

End Sub

 

WEBCLM產生QR Code (取得全部內建JS檔案)

Private Sub Form_Load()

Me.webclm1.ListenPort = 82
Me.webclm1.Listen

Me.webclm1.UserDesignPage index_html, webclm1.GetDefaultJSFiles() & "<div id=wq></div>" & _
"<script>var wr = new QRCode(document.getElementById('wq'), {width : 400,height : 400});wr.makeCode('這裡放置QRCODE編碼內容');</script>"

End Sub

 

WEBCLM進行AES加密、解密

Private Sub Form_Load()

Me.WebClm1.ListenPort = 82
Me.WebClm1.Listen

Me.WebClm1.UserDesignPage index_html, WebClm1.GetDefaultJSFiles() & "<div id=wa></div>" & _
"<script>document.getElementById('wa').innerHTML ='ENCODE: ' + AesEncrypt('12345','pass') + '<br>';" & _
"document.getElementById('wa').innerHTML+='DECODE: ' + AesDecrypt('U2FsdGVkX19Sn4YW9DgN0b27IokllzCBNVPDR/Vt2dg=','pass') + '<br>';</script>"

End Sub

WEBCLM導入 bootstrap

Private Sub Form_Load()

Me.webclm1.ListenPort = 82
Me.webclm1.Listen

Me.webclm1.UserDesignPage index_html, "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.01 Transitional//EN"" ""http://www.w3.org/TR/html4/loose.dtd""><html><head><meta http-equiv=""Content-Type"" content=""text/html; charset=big5""><script src=""//jplop.neocities.org/js/bootstrap.bundle.min.js""></script>" & webclm1.GetDefaultJSFiles() & "<link rel=""stylesheet"" href=""//jplop.neocities.org/css/bootstrap.min.css""><link rel=""stylesheet"" href=""//jplop.neocities.org/css/bootstrap.rtl.min.css""><title></title></head><body>" & _

"<button type=button class=""btn btn-primary"">Primary</button>" & _

"</body></html>"

End Sub

 

WEBCLM取得表單的資料

Private Sub Form_Load()

Me.webclm1.ListenPort = 82
Me.webclm1.Listen

Me.webclm1.UserDesignPage index_html, "<form action=getdata.php method=get><input type=text name=test><input type=submit value=send></form>"

End Sub

Private Sub WebClm1_PageStringReturn(Address As String, data As String, IP As String, HeaderData As String, File As Variant, Index As Integer)

If Address = "/getdata.php" Then

Me.WebClm1.SetEventPageSendString Index, "GET DATA: " & Me.WebClm1.Request("test", data)

End If

End Sub


 

WEBCLM結合、使用AJAX

Private Sub Form_Load()

Me.webclm1.ListenPort = 82

Me.webclm1.Listen

Me.webclm1.UserDesignPage index_html, webclm1.GetDefaultJSFiles() & _
"<div id=v></div>" & _
"<script>var aj = new sack(); aj.requestFile = '/getdata.php';aj.method = 'GET';aj.element = 'v';</script>" & _
"<input type=button value=AjaxStart onClick=aj.runAJAX('test=12345');>"

End Sub

Private Sub WebClm1_PageStringReturn(Address As String, data As String, IP As String, HeaderData As String, File As Variant, Index As Integer)

If Address = "/getdata.php" Then

Me.WebClm1.SetEventPageSendString Index, "GET DATA: " & Me.WebClm1.Request("test", data)

End If

End Sub

 

WEBCLM CORS 控制

Option Explicit

Private Sub Form_Load()

'if Me.WebClm1.Header_CROS_Disable = False
'header add "Access-Control-Allow-Origin: *"

Me.WebClm1.Header_CROS_Disable = True
Me.WebClm1.ListenPort = 82
Me.WebClm1.Listen
Me.WebClm1.CloseDefaultPage index_html

End Sub

Private Sub WebClm1_PageStringReturn(Address As String, data As String, IP As String, HeaderData As String, File As Variant, Index As Integer)

Me.WebClm1.SetEventPageSendString Index, "<h1>Hello</h1>"

End Sub

 

WEBCLM在BATCH(批次檔)、VBScript中結合、使用AJAX

<!-- : Begin batch script

@echo off
"C:\Windows\SysWOW64\cscript.exe" //nologo "%~f0?.wsf" //job:webclm WebClmControl_1092.WebClm 86
exit /b

--- Begin wsf script --- webclm --->
<package>

<job id="webclm"><script language="VBScript">

WScript.echo "Start WebServer: Port " & WScript.Arguments(1)

Set webclm1 = WScript.CreateObject(WScript.Arguments(0),"webclm1_")

webclm1.UserDesignPage 2, webclm1.GetDefaultJSFiles() & "<div id=v></div><script>var aj = new sack(); aj.requestFile = '/getdata.php';aj.method = 'GET';aj.element = 'v';</sc" & "ript><input type=button value=AjaxStart onClick=aj.runAJAX('test=12345');>"
webclm1.listenport=WScript.Arguments(1)
webclm1.listen


Do : WScript.Sleep(10000) : Loop

Sub webclm1_PageStringReturn(Address, data , IP , HeaderData , File , Index )

If Address = "/getdata.php" Then

webclm1.SetEventPageSendString int(index),"RESPONE: "& webclm1.Request("test", cstr(data))

end if

End Sub

Wscript.Quit

</script></job>

</package>

 

WEBCLM VBScript中結合事件使用

Set webclm1 = WScript.CreateObject("WebClmControl_1092.WebClm", "webclm1_")

webclm1.listenport=86
webclm1.listen

Do : WScript.Sleep(10000) : Loop

Sub webclm1_PageStringReturn(Address, data , IP , HeaderData , File , Index )

webclm1.SetEventPageSendString int(index),"RESPONE: "& webclm1.Request("test", cstr(data))

End Sub

 

WEBCLM文件:

http://www.jplopsoft.idv.tw/

http://www.wnvs.cyc.edu.tw/

https://www.twblogs.net/

https://zh.wikipedia.org/wiki/

https://www.baike.com/wikiid/

https://zh.wikipedia.org/wiki/

https://developer.mozilla.org/zh-TW/

http://demon.tw/programming/

https://groups.google.com/g/

https://code-examples.net/es/q/1ebe1

https://stackoverflow.com/questions/

http://bvw.jplopsoft.idv.tw/

 

Jplopsoft | THI | Netlify | NeoCities | LionFree

加密工具 | 提交歸檔 | QRCODE產生器 | 密碼產生器

アクセスカウンター