...

Developed or developing a new product in PureBasic? Tell the world about it.
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

...

Post by Heathen »

File removed
Last edited by Heathen on Sun Feb 28, 2010 10:17 am, edited 31 times in total.
I love Purebasic.
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Thanks for the file. Since it's not in the post, to everybody else ... this is an HTML web server used for downloading, I gathered from reading the source.

Thanks again!
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Re: Open source http download server

Post by Heathen »

thanks, I will add that to the title :P
I love Purebasic.
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

Fixed a crash when trying to lookup an ip when no download is selected.
I love Purebasic.
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

A pure download server is majorly kickass. For instance. A game updating client can check the server for updates. It's also great for image hosting and the like ... the uses are almost endless.
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

:) At first I wrote this program to send FLV videos like youtube but decided to make it a full fledged multipurpose download server. I havent tested the program update functionality, so if someone can do that for me, I would appreciate it. Just send a regular http header with "program-version: " in the header and add "<programname.ext> = <version>" to 'versions.txt' :)

Ps: made a small update which rewords some of the comments
I love Purebasic.
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

When I head home, after going out on a date with the Mrs ;) I'll give it a try. btw: There is another thread found @ http://www.purebasic.fr/english/viewtopic.php?t=24101 . A DownloadToMemory chunk of code. Might be useful for creating an "updator" client to go with this server :)
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

After some thought, ive decided to add a download manager to the program, i'll probably add this after version 1.0.

Getting ready to upload version 0.2

Changes:

- Added basic attack protection with auto-ban
- Fixed some bugs
- Added 2 new mutices and cleaned up some of the other mutex code
- Optimized the Receive procedure.
I love Purebasic.
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

I am working on an antivirus\antispyware library :) it has heuristic detection, etc. and if you want you can incorporate it in the server :D.
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

Inf0Byt3 wrote:I am working on an antivirus\antispyware library :) it has heuristic detection, etc. and if you want you can incorporate it in the server :D.
Sounds cool! Perhaps I can add it when I add the download client :)

Updated to 0.2

Changes:

- Added basic attack protection with auto-ban
- Fixed some bugs
- Added 2 new mutices and cleaned up some of the other mutex code
- Optimized the Receive procedure.
- Removed a pointless mutex lock in the send thread
- Optimized the send thread a bit
I love Purebasic.
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

Shannara wrote:When I head home, after going out on a date with the Mrs ;) I'll give it a try. btw: There is another thread found @ http://www.purebasic.fr/english/viewtopic.php?t=24101 . A DownloadToMemory chunk of code. Might be useful for creating an "updator" client to go with this server :)
:P
I love Purebasic.
Pantcho!!
Enthusiast
Enthusiast
Posts: 538
Joined: Tue Feb 24, 2004 3:43 am
Location: Israel
Contact:

Post by Pantcho!! »

Looks great!
Maybe it is the time to get a real SERVER with threads working!

Good work, but can you please comment your code?
I am more a PB 3.94 and just starting out with PB v4 and your code
looks great but its density is high and no commentery.

If you want a really really good example of http server threaded check out this POWERBASIC source code made years ago - http://www.powerbasic.com/support/forum ... 00085.html

P.S does the server support resume?
and making a cgi exe support should be easy... it somthing has to do with PIPE.
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

Pantcho!! wrote:Looks great!
Maybe it is the time to get a real SERVER with threads working!

Good work, but can you please comment your code?
I am more a PB 3.94 and just starting out with PB v4 and your code
looks great but its density is high and no commentery.

If you want a really really good example of http server threaded check out this POWERBASIC source code made years ago - http://www.powerbasic.com/support/forum ... 00085.html

P.S does the server support resume?
and making a cgi exe support should be easy... it somthing has to do with PIPE.
Read the features list, it already has threads and resume support :P I doubt I will add CGI support since this is just a download server for now. I will probably add more comments in a future version.
I love Purebasic.
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

Updated to 0.2b very small update... 3 months later :lol:
I love Purebasic.
User avatar
oryaaaaa
Addict
Addict
Posts: 825
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

Post by oryaaaaa »

cool !

I am reading your source now.
Please add "Protected" in procedure, use gadget #PB_Any.
Post Reply