把遊戏以變量, 數字形式等保存到服务器上,那么可以像网游一样讀取最新資訊, 而且簡单方便希望有人会
ppspssss 发表于 2018-8-24 15:45
def url_data(url) api = Win32API.new('Urlmon', 'URLDownloadToCacheFile', 'ippiii', 'i') buf = "\0" * 1024 if api.call(0, "#{url}?#{rand(10)}", buf, 1024, 0, 0) == 0 open(buf.sub(/\0+$/, ""), 'rb') { |f| f.read }.to_s endendprint(url_data("https://rpg.blue/forum.php"))
def url_data(url) api = Win32API.new('Urlmon', 'URLDownloadToCacheFile', 'ippiii', 'i') buf = "\0" * 1024 if api.call(0, "#{url}?#{rand(10)}", buf, 1024, 0, 0) == 0 open(buf.sub(/\0+$/, ""), 'rb') { |f| f.read }.to_s end end print(url_data("https://rpg.blue/forum.php"))
折叠内容标题(非必须)
折叠内容
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2024-11-27 20:36
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.