mIRC Home    About    Download    Register    News    Help

Print Thread
getting binary files using socket? #139124 11/01/06 09:01 AM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
how do I download any binary file by using sockets?
can anyone show me an example?

Re: getting binary files using socket? #139125 11/01/06 11:39 AM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Thanks to $download() you no longer need to script such a thing, you just specify something like:

var %url = http://mirc.stealth.net/download/mirc616.exe
if ($download(mirc616.exe, GET, %url , 2, binary)) run mirc616.exe
else echo -a Error retrieving data


Gone.
Re: getting binary files using socket? #139126 12/01/06 08:57 AM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
ah thanks thats good but I want to know hot to downloading files using sockets too..

Re: getting binary files using socket? #139127 12/01/06 09:09 AM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
With sockets, you sockread into a &binvar, and /fwrite or /bwrite to a file.

There's no difference to downloading plain text data, just using binvars instead of regular variables.

You can find various examples using the Search feature.


Gone.
Re: getting binary files using socket? #139128 12/01/06 09:43 AM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
thank you so much smile

Re: getting binary files using socket? #139129 25/01/06 11:24 AM
Joined: Jan 2006
Posts: 61
C
Crash_N_Burn Offline
Babel fish
Offline
Babel fish
C
Joined: Jan 2006
Posts: 61
Amaizing shocked ! i dont knew that feature...its around since what version of mIRC?


The practice do the Master...
Re: getting binary files using socket? #139130 25/01/06 12:49 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
What feature, sockets? Sockets have been there since: 13/12/97 - mIRC v5.3

If you're referring to the $download snippet, I made it this month, it's brand new.


Gone.
Re: getting binary files using socket? #139131 26/01/06 02:47 AM
Joined: Jan 2006
Posts: 61
C
Crash_N_Burn Offline
Babel fish
Offline
Babel fish
C
Joined: Jan 2006
Posts: 61
I said for the identifier $download.

its is possible use this identifier for all version of mIRC, except old versions?


The practice do the Master...