⬇️ 多语言demo下载
<p>[TOC]</p>
<ul>
<li>如果下方没有您使用的语言,而恰好您写了,欢迎与我们共享(联系客服),我们有礼品相送。</li>
</ul>
<h6>易语言 demo</h6>
<ul>
<li>
<h2>[<b style="font-size:15px;display:inline-block;width:150px">⬇️ 易语言</b>](<a href="https://feng.suanst.com/demo.sa?file=e_fengwan.zip">https://feng.suanst.com/demo.sa?file=e_fengwan.zip</a> "易语言demo下载")👉 <span style="color:#a70" >蜂玩同步上传图片()</span>
> 利用 精易模块 v11.0.5 的“网页_访问S”函数发送 http 数据
<strong>二进制</strong> 方式上传,减少转码开销、网络 IO 传输开销,兼容文件、字节集方式传图片数据
例子程序利用了模块的 图片&#95;转换1 将图片转为 JPG 格式(可改参数不压缩)
更新时间 2023.6.18</h2>
</li>
</ul>
<h6>火山软件 demo</h6>
<ul>
<li>
<h2>[<b style="font-size:15px;display:inline-block;width:150px">⬇️ 火山软件</b>](<a href="https://feng.suanst.com/demo.sa?file=huoshan_fengwan.zip">https://feng.suanst.com/demo.sa?file=huoshan_fengwan.zip</a> "火山demo下载")👉 <span style="color:#a70" >类_蜂玩答题.上传图片 ()</span>
> 依赖模块:"Curl网络传输" "JSON数据访问支持" "CxImage图像处理支持" "OpenSSL"
都是火山官方模块,请自行添加。<strong>base64</strong> 方式上传图片数据
提供作者:暖一杯茶 20231204
更新时间 2023.12.4</h2>
</li>
</ul>
<h6>Lua demo</h6>
<ul>
<li>[<b style="font-size:15px;display:inline-block;width:150px">⬇️ Lua 语言</b>](<a href="https://feng.suanst.com/demo.sa?file=lua_fengwan.zip">https://feng.suanst.com/demo.sa?file=lua_fengwan.zip</a> "Lua语言demo下载")👉 <span style="color:#a70">Fengwan.sendfileex()</span>
> 利用系统 curl 发送 http 数据,<strong>二进制</strong> 方式上传,减少转码开销、网络 IO 传输开销
是按键精灵lua插件的复刻版,理论上支持 各种手机精灵
暂时发现不支持 安卓 8.0 及以下系统,如需支持老系统安卓,请参考“懒人精灵lua”、“触动精灵lua”
更新时间 2023.7.2
<strong>代码说明:</strong>
1、需要查看或修改 function Fengwan.temppath() 函数
<pre><code class="language-lua">--如果您的系统非安卓,需要修改这里返回的路径
function Fengwan.temppath() --函数作用:返回一个创建临时文件的目录
return &quot;/sdcard/&quot; --具体路径可由系统、和文件访问权限定义( IOS 可以为 &quot;/private/var/&quot; )
end</code></pre>
<pre><code class="language-lua">-- 触动精灵调用,可在 fengwan.lua 文件最后加入以下测试代码
local re =Fengwan.sendfileex(&quot;密码串&quot;,&quot;1001&quot;,30,&quot;你好世界&quot;,0,&quot;/sdcard/yzm.png&quot;,&quot;1001|9A42B0F1BD994C75&quot;,30)
-- 利用正则获取各个字段的值(或者用精灵支持的json解析函数)
local tid = string.match(re,&quot;\&quot;tid\&quot;: \&quot;.-\&quot;&quot;)
local answer = string.match(re,&quot;\&quot;answer\&quot;: \&quot;.-\&quot;&quot;)
local errmsg = string.match(re,&quot;\&quot;errmsg\&quot;: \&quot;.-\&quot;&quot;)
local warnmsg = string.match(re,&quot;\&quot;warnmsg\&quot;: \&quot;.-\&quot;&quot;)
if tid ~=nil then errmsg = string.sub(tid,6+#&quot;tid&quot;,-2) else errmsg=&quot;&quot; end
if errmsg ~=nil then errmsg = string.sub(errmsg,6+#&quot;errmsg&quot;,-2) else errmsg=&quot;&quot; end
if warnmsg ~=nil then warnmsg = string.sub(warnmsg,6+#&quot;warnmsg&quot;,-2) else warnmsg=&quot;&quot; end
if answer ~=nil then answer = string.sub(answer,6+#&quot;answer&quot;,-2) else answer=&quot;&quot; end
dialog (re,3000)
-- 需要判断 errmsg、warnmsg、answer 的内容,根据不同的返回值进行不同的操作
-- 返回值的可能性需同时参考 上传图片 sendfile() 和 获取答案 getanswer()
-- https://www.showdoc.com.cn/fengwan/10258903646810375
-- https://www.showdoc.com.cn/fengwan/10259091235804385</code></pre>
<pre><code class="language-lua">--触摸精灵调用,可在 fengwan.lua 文件最后加入以下测试代码
function main()
local re = Fengwan.sendfileex(&quot;密码串&quot;,&quot;1001&quot;,30,&quot;你好世界&quot;,0,&quot;/sdcard/yzm.png&quot;,&quot;1001|9A42B0F1BD994C75&quot;,30)
-- 利用正则获取各个字段的值 (或者用精灵支持的json解析函数)
local tid = string.match(re,&quot;\&quot;tid\&quot;: \&quot;.-\&quot;&quot;)
local answer = string.match(re,&quot;\&quot;answer\&quot;: \&quot;.-\&quot;&quot;)
local errmsg = string.match(re,&quot;\&quot;errmsg\&quot;: \&quot;.-\&quot;&quot;)
local warnmsg = string.match(re,&quot;\&quot;warnmsg\&quot;: \&quot;.-\&quot;&quot;)
if tid ~=nil then errmsg = string.sub(tid,6+#&quot;tid&quot;,-2) else errmsg=&quot;&quot; end
if errmsg ~=nil then errmsg = string.sub(errmsg,6+#&quot;errmsg&quot;,-2) else errmsg=&quot;&quot; end
if warnmsg ~=nil then warnmsg = string.sub(warnmsg,6+#&quot;warnmsg&quot;,-2) else warnmsg=&quot;&quot; end
if answer ~=nil then answer = string.sub(answer,6+#&quot;answer&quot;,-2) else answer=&quot;&quot; end
logDebug(re)
-- 需要判断 errmsg、warnmsg、answer 的内容,根据不同的返回值进行不同的操作
-- 返回值的可能性需同时参考 上传图片 sendfile() 和 获取答案 getanswer()
-- https://www.showdoc.com.cn/fengwan/10258903646810375
-- https://www.showdoc.com.cn/fengwan/10259091235804385
end</code></pre>
<hr /></li>
</ul>
<h6>触动精灵 demo 其他精灵参考</h6>
<ul>
<li>
<h2>[<b style="font-size:15px;display:inline-block;width:180px">⬇️ 触动精灵lua</b>](<a href="https://feng.suanst.com/demo.sa?file=ts_fengwan.zip">https://feng.suanst.com/demo.sa?file=ts_fengwan.zip</a> "触动精灵lua demo下载")👉 <span style="color:#a70">Fengwan.sendfileex()</span>
> 使用触动精灵自带的post函数、文件 <strong>base64</strong> 函数,实现上传图片数据,兼容性好
<strong>供其他精灵参考</strong>,仅需替换 httpPost()、httpGet()、imageBase64()、urlEncoder()以及json解析函数
换成自己精灵支持的 post、get、filebase64、urlencode、json解析即可正常使用。
更新时间 2023.11.29 (之前的版本可以按如下操作修复:字段<code>timeout1=</code>应修复为<code>timeout=</code>、<code>[&quot;timeout1&quot;]</code>应修复为<code>[&quot;timeout&quot;]</code>,使用查找替换可以快速定位)</h2>
</li>
</ul>
<h6>懒人精灵 demo 其他精灵参考</h6>
<ul>
<li>
<h2>[<b style="font-size:15px;display:inline-block;width:180px">⬇️ 懒人精灵lua</b>](<a href="https://feng.suanst.com/demo.sa?file=lr_fengwan.zip">https://feng.suanst.com/demo.sa?file=lr_fengwan.zip</a> "懒人精灵lua demo下载")👉 <span style="color:#a70">Fengwan.sendfileex()</span>
> 使用懒人精灵自带的post函数、文件 <strong>base64</strong> 函数,实现上传图片数据,兼容性好
<strong>供其他精灵参考</strong>,仅需替换 httpPost()、httpGet()、getFileBase64()、encodeUrl()以及json解析函数
换成自己精灵支持的 post、get、filebase64、urlencode、json解析即可正常使用。
更新时间 2023.7.2</h2>
</li>
</ul>
<h6>触摸精灵 demo</h6>
<ul>
<li>
<h2>[<b style="font-size:15px;display:inline-block;width:180px">⬇️ 触摸精灵lua</b>](<a href="https://feng.suanst.com/demo.sa?file=te_fengwan.zip">https://feng.suanst.com/demo.sa?file=te_fengwan.zip</a> "触摸精灵lua demo下载")👉 <span style="color:#a70">Fengwan.sendfileex()</span>
> 使用触摸精灵v5.2自带的httpGet()、jsonDecode()、并结合 curl 插件实现 <strong>二进制</strong> 方式上传。
兼容ios、Android。但注意需要安装 curl 插件。
更新时间 2023.12.21 </h2>
</li>
</ul>
<h6>按键精灵PC demo</h6>
<ul>
<li>
<h2>[<b style="font-size:15px;display:inline-block;width:150px">⬇️ 按键精灵PC</b>](<a href="https://feng.suanst.com/demo.sa?file=anjianpc_fengwan.zip">https://feng.suanst.com/demo.sa?file=anjianpc_fengwan.zip</a> "按键精灵PC demo下载")👉 <span style="color:#a70" >FWsendfileex()</span>
> 利用 WinHttp.WinHttpRequest.5.1 组件发送 http 数据。
由于按键 PC 不支持 byte 数据类型,固使用 <strong>base64</strong> 方式上传
更新时间 2023.6.21</h2>
</li>
</ul>
<h6>按键精灵手机版 demo</h6>
<ul>
<li>
<h2>[<b style="font-size:15px;display:inline-block;width:180px">⬇️ 按键精灵手机版</b>](<a href="https://feng.suanst.com/demo.sa?file=anjianmobile_fengwan.zip">https://feng.suanst.com/demo.sa?file=anjianmobile_fengwan.zip</a> "按键精灵手机版demo下载")👉 <span style="color:#a70">fw_sendfileex()</span>
> 低版本:利用按键URL库、紫猫插件 以 <strong>base64</strong> 方式上传图片,兼容性好
(兼容任何版本安卓、ios 苹果系统。注意:ios 需修改例子里面的截图保存的目录为:/private/var/yzm.png )
普通版:使用系统的 <strong>curl</strong> 进行 <strong>二进制</strong> 方式上传,性能好(MQ代码仅做封装和示例 lua 插件是底层逻辑)
暂时发现不支持 安卓 8.0 及以下系统,有能力的开发者可以2种方案都写入,让客户选择。
更新时间 2023.7.21</h2>
</li>
</ul>
<h6>Python demo</h6>
<ul>
<li>
<h2>[<b style="font-size:15px;display:inline-block;width:150px">⬇️ Python</b>](<a href="https://feng.suanst.com/demo.sa?file=python_fengwan.zip">https://feng.suanst.com/demo.sa?file=python_fengwan.zip</a> "Python demo下载")👉 <span style="color:#a70" >fwsendfileex()</span>
> fengwan.py 利用 requests 库 发送 http 数据,<strong>二进制</strong> 方式上传,减少转码开销、网络 IO 传输开销
利用 PIL Image 将图片转 JPEG 格式,默认进行转换(可改参数)
aiofengwan.py 利用 asyncio,aiofiles,aiohttp 实现上述代码的异步协程化
更新时间 2023.6.20</h2>
</li>
</ul>
<h6>C++ demo</h6>
<ul>
<li>
<h2>[<b style="font-size:15px;display:inline-block;width:150px">⬇️ C++ </b>](<a href="https://feng.suanst.com/demo.sa?file=c_fengwan.zip">https://feng.suanst.com/demo.sa?file=c_fengwan.zip</a> "C++ demo下载")👉 <span style="color:#a70" >uploadImage() 、 uploadPic()</span>
> <strong>二进制</strong> 方式上传,减少转码开销、网络 IO 传输开销。
含3个demo,代码不够完善,还需结合api说明(或其他语言例子)进行深度优化。
程序不带图片压缩,为加快上传速度 和 减少服务器开销 建议使用 jpg 截图方式
更新时间 2023.12.2</h2>
</li>
</ul>
<h6>C# demo</h6>
<ul>
<li>
<h2>[<b style="font-size:15px;display:inline-block;width:150px">⬇️ C# CShape</b>](<a href="https://feng.suanst.com/demo.sa?file=CShape_fengwan.zip">https://feng.suanst.com/demo.sa?file=CShape_fengwan.zip</a> "CShape demo下载")👉 <span style="color:#a70" >fwsendfileex()</span>
> 利用 HttpWebRequest 类 发送 http 数据,兼容 文件 或 字节数组 类型上传图片
<strong>二进制</strong> 方式上传,减少转码开销、网络 IO 传输开销。内含控制台、Winform 2种格式
程序不带图片压缩,为加快上传速度 和 减少服务器开销 建议使用 jpg 截图方式
(大漠插件使用 CaptureJpg 函数)或转换图片格式到 jpg (png转jpg、bmp转jpg)
更新时间 2023.6.18</h2>
</li>
</ul>
<h6>TC demo</h6>
<ul>
<li>
<h2>[<b style="font-size:15px;display:inline-block;width:150px">⬇️ TC T语言</b>](<a href="https://feng.suanst.com/demo.sa?file=TC_fengwan.zip">https://feng.suanst.com/demo.sa?file=TC_fengwan.zip</a> "TC demo下载")👉 <span style="color:#a70" >fw_sendfileex()</span>
> 使用 TC库内的 httpsubmit() 发送图片 <strong>base64</strong> 格式数据,支持多线程调用
程序不带图片压缩,为加快上传速度 和 减少服务器开销 建议使用 jpg 截图方式
(大漠插件使用 CaptureJpg 函数)或转换图片格式到 jpg (png转jpg、bmp转jpg)
更新时间 2023.6.18</h2>
</li>
</ul>
<h6>VB.NET demo</h6>
<ul>
<li>
<h2>[<b style="font-size:15px;display:inline-block;width:150px">⬇️ VB.NET</b>](<a href="https://feng.suanst.com/demo.sa?file=vb.net_fengwan.zip">https://feng.suanst.com/demo.sa?file=vb.net_fengwan.zip</a> "VB.NET demo下载")👉 <span style="color:#a70" >fwsendfileex()</span>
> 利用 HttpWebRequest 类 发送 http 数据,兼容 文件 或 字节数组 类型上传图片
<strong>二进制</strong> 方式上传,减少转码开销、网络 IO 传输开销。内含控制台、Winform 2种格式
程序不带图片压缩,为加快上传速度 和 减少服务器开销 建议使用 jpg 截图方式
(大漠插件使用 CaptureJpg 函数)或转换图片格式到 jpg (png转jpg、bmp转jpg)
更新时间 2023.6.18</h2>
</li>
</ul>
<h6>VB6 demo</h6>
<ul>
<li>
<h2>[<b style="font-size:15px;display:inline-block;width:150px">⬇️ VB6</b>](<a href="https://feng.suanst.com/demo.sa?file=vb6_fengwan.zip">https://feng.suanst.com/demo.sa?file=vb6_fengwan.zip</a> "VB6 demo下载")👉 <span style="color:#a70" >fwsendfileex()</span>
> 利用 WinHttp.WinHttpRequest.5.1 组件发送 http 数据,<strong>二进制</strong> 方式上传
减少转码开销、网络 IO 传输开销
程序不带图片压缩,为加快上传速度 和 减少服务器开销 建议使用 jpg 截图方式
(大漠插件使用 CaptureJpg 函数)或转换图片格式到 jpg (png转jpg、bmp转jpg)
更新时间 2023.6.21</h2>
</li>
</ul>