This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Need to get a file from Webpage.

Old posts that have not been replied to for several years.
Locked
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Need to get a file from Webpage.

Post by CoMMy »

Need some help again.

I tried searching about a topic which would help me figure out this, i found one but it didnt help.
If there is another topic please guide me to it. I really need to add this to my script.

Im trying to get a file from an http site and replace a tcl in the scripts dir.

In the other topic i found it said about the netbots tcl. I opened that script but didnt get any help on how to do this.

Can you help?

Thanks :)
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Post by CoMMy »

i know the exec wget command.

I just need it for a windows compatible bot. Windrop.

Anyone ? :cry:
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

use the http package
or the socket commands
Elen sila lúmenn' omentielvo
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

check this forum i allready asked something like that and as i recall user or papillion think it was papillion not sur posted it to me
XplaiN but think of me as stupid
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Post by CoMMy »

Is this what you mean?

Code: Select all

source lib/tcl8.4/http2.4/http.tcl 

bind pub m !update update:pub 

proc update:pub {nick uhost hand chan arg} { 
  set out [lindex $arg 0] 
  set url [lindex [split $arg] 1] 
  set fid [open $out w+] 
  fconfigure $fid -translation binary 
  set body [http::data [set token [http::geturl $url -binary 1 -timeout 9999]]] 
  puts $fid $body 
  close $fid 
  http::cleanup $token 
  putquick "NOTICE $nick :Download complete." 
}
I figured out everything. But the problem is that i want to replace the $out file, for ex. (scripts/mytcl.tcl) and replace it with the url i specify to the bot.

How can i do this ?
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
Locked