Module: Download
4 Attachment(s)
Update 2013-07-31: I removed the binary. It was a shitty module. If anyone is interested I'll leave the source, but have in mind it's much better to use sockets for three reasons. 1. Everyone has it. 2. It won't crash like this do. 3. It's easier to work with.
Please refer to my HTTP2 include instead of this module. Download 1.0 Enables plugins to download files from http sources. Basically a wrapper for URLDownloadToFile. More info on that function: http://msdn.microsoft.com/en-us/library/ms775123.aspx Could enable, for example, auto-updating of plugins. Known problem: When I placed 6+ downloads at server startup it would crash on me at restart. (Not first start) Reason: unknown. I'm not that good at C++... Either way, it basically works. PHP Code:
Black Rose, also known here as [ --<-@ ] Black Rose or DivinityX |
Re: Module: Download
Just lol, and gj.
Will test this. Maybe a port to linux? |
Re: Module: Download
You can make the possibility of compress files and uncompress this. Or just the ability of uncompress files after download a compressed files. It would help a lot servers when downloading big files (like models)
EDIT@ You should add the ability to read file version url side too =P |
Re: Module: Download
Is this supposed to be an alternative to FTP? I think I would always prefer FTP.
|
Re: Module: Download
Quote:
|
Re: Module: Download
Quote:
All my modules are based on Windows functions. Quote:
As stated, I'm not that good at C++. Quote:
Quote:
|
Re: Module: Download
Quote:
|
Re: Module: Download
Quote:
Start downloading file, check total file size, abort and then decide if you wanna download it is one way. The best way of course would be if there was a php generated site to tell you only the information you want, download that. If that matches your current version, don't download the new. If it differs, download. You could also download the file, load it as a separate plugin and then compare versions. Seems very unpractical though with so much downloading. I made a small autoupdate example just to prove the point. This would not be good enough for a plugin to use. (So don't!) It just shows the method. Current plugin: PHP Code:
PHP Code:
http://DivinityX.net/au1.png After restart (mapchange would have the same effect): http://DivinityX.net/au2.png |
Re: Module: Download
Yeah you are right =P
Sorry '-' |
Re: Module: Download
Advantages/disadvantages of using this instead of using the sockets module to do this manually, or even the HTTP Downloader plugin?
|
All times are GMT -4. The time now is 15:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.