mIRC Home    About    Download    Register    News    Help

Print Thread
#19363 15/04/03 05:56 PM
Joined: Jan 2003
Posts: 148
K
Knappen Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Jan 2003
Posts: 148
I making a socket update script for my script and I`m wondering how I actually download the new file (e.g newversion.exe) to my computer and where it`s laid...

Thanks! smile

#19364 15/04/03 09:53 PM
Joined: Mar 2003
Posts: 9
A
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
A
Joined: Mar 2003
Posts: 9
If you can't do that, don't depend on other's work. You can always tell user how to download an update using www browser. If you want to learn sockets, go to www.mircscripts.org -> tutorials. Don't rip, it's so lame.

#19365 16/04/03 07:42 AM
Joined: Feb 2003
Posts: 47
G
Ameglian cow
Offline
Ameglian cow
G
Joined: Feb 2003
Posts: 47
Giving some guidelines isn't too much to ask imo smile

You'd need to do the following steps (might miss one or two, it's early for me smile )

1) Make connection with fileserver where update file is located ( /help /sockopen )
2) On connection, send the file request (HTTP request i assume, so you need to study the HTTP protocol to find out how the request looks like) ( /help /sockwrite )
3) Server will be sending the file-data, store this info in a new file ( /help /sockread /help /write )
4) When filetransfer is completed, close connection ( /help /sockclose )

The idea is pretty obvious but the /help <command> should point you to your way.

#19366 16/04/03 05:22 PM
Joined: Jan 2003
Posts: 148
K
Knappen Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Jan 2003
Posts: 148
Thanks! But it really doesn`t help me much... I`ve figured out where the file is laid. I tried to use bwrite to copy the file from the server but it only downloads 210 kb and there is no filename... What do I do?

Plis help me! Thanks!

#19367 16/04/03 08:14 PM
Joined: Feb 2003
Posts: 47
G
Ameglian cow
Offline
Ameglian cow
G
Joined: Feb 2003
Posts: 47
Well post the part of your script where you are trying to download it so we (or I) can point out any mistakes or flaws.

If you actually read 210kb of the file then you are probably doing something wrong in your while loop where you retrieve data from the server.

#19368 16/04/03 09:07 PM
Joined: Jan 2003
Posts: 148
K
Knappen Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Jan 2003
Posts: 148
I got it to work! I joined #help and got a guy there to help me...
But thanks for your help and interest!


Link Copied to Clipboard