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.

Sending data to a web page

Old posts that have not been replied to for several years.
m
mike938

Post by mike938 »

i have a web page thats a script that adds data to a databse, i need a script that sends data to it using the get method

so it would send data like abc.cgi?mode=add&name=$name&type=$type&ftp=$ftp&files=$files

p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

The following should work

abc.cgi?mode=add&name=$name&type=$type&ftp=$ftp&files=$files

Code: Select all

proc example {name type ftp files} {
  if {![llength [info commands "::http::geturl"]]} {
    if {[catch {package require http} t]} {
      putlog "Can't load the required http module"
      return
    }
  }
  set q [::http::formatquery name $name type $type ftp $ftp files $files]
  set t [::http::geturl "URL HERE" -query $q]
  ::http::cleanup $t
}
m
mike938

Post by mike938 »

this is my code
---------------------
bind pub - "test" addrls
proc addrls {nick uhost hand chan text} {
putcmdlog "#$nick#"
set ftp [lindex $text 1]
set type [lindex $text 5]
set name [lindex $text 7]
set files [lindex $text 10]
if {![llength [info commands "::http::geturl"]]} {
if {[catch {package require http} t]} {
putlog "Can't load the required http module"
return
}
}
set q [::http::formatquery mode add name $name type $type ftp $ftp files $files]
set t [::http::geturl "http://www.mike938.dns2go.com/obl.cfm" -query $q]
::http::cleanup $t
}
--------------------
m
mike938

Post by mike938 »

wuts wrong it doesn't goto the web page
m
mike938

Post by mike938 »

o and wuts the http module do i need to dwnload that for my bot somewhere?
and if so where?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

When you trigger the script, does it add the text "can't load the required http module"?

If so, then it is not included with TCL. I will code an alternative method somtime tomorow.
m
mike938

Post by mike938 »

it just says the #mike938#
than does nutin
m
mike938

Post by mike938 »

by the way in a windrop if that matters
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

AH, that does matter, as TCL is staticly compiled into windrop, so there is no proper interpreter.

I will work on a script somtime tomorow as mentioned.
m
mike938

Post by mike938 »

ok thanks
m
mike938

Post by mike938 »

email it to me at mikethetttking@hotmail.com
m
mike938

Post by mike938 »

can sumone else write the script for a windrop to do wut i want?
i need it ASAP
m
mike938

Post by mike938 »

did u write it yet?
i really need it
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

How much is it worth?

I am about to go postal on this one, coz you expect me to devote 100% of my free time to you. Got news fot ya, you and 50 odd others.
m
mike938

Post by mike938 »

u said u would write it today
1 hour and 9 minutes left hehe
Locked