Simple TCL to HTTP Reguest

From SHellium Wiki
Jump to: navigation, search
Geographylogo.png In other languages: English | Afrikaans | Albanian | Arabic | Brazilian | Bulgarian | Catalan | Chinese | Croatian | Czech | Danish | Dutch | Esperanto | Estonian | Filipino | Finnish | Flemish | French | German | Greek | Hebrew | Hindi | Hungarian | Indonesian | Italian | Japanese | Latvian | Lithuanian | Macedonian | Malay | Malayalam | Norwegian (Bokmål) | Norwegian (Nynorsk) | Persian | Polish | Portuguese | Romanian | Russian | Serbian | Slovak | Slovenian | Spanish | Swedish | Turkish | Ukrainian | Urdu

Simple TCL to HTTP Reguest

For example, if you have a web page like this: http://www.ihsana.com/botsms.php?number=xxxxx&message=yyyy or in html

<form method="get" >
   <input type="text" name="number" />
   <input type="text" name="message" />
   <input type="submit" />
</form>

you can make with tcl, as follows:

#Command !sms phonenumber message
package require http
bind pub * !sms sms_ihsana
proc sms_ihsana {nick uhost hand chan arg} { 
  set number [lindex $arg 0]
  set message [lrange $arg 1 30]
  ::http::config -useragent "Mozilla/5.0"
  set http_req [::http::geturl "http://www.ihsana.com/botsms.php?number=$number&message=$message" -timeout 2000]
  set data [::http::data $http_req]    
  puthelp "PRIVMSG $chan :Message has been sent"
}
putlog "Free SMS by Jasman"

do not forget to add http.tcl before. please be creative according to your taste

Personal tools
Namespaces

Variants
Actions
Navigation
Indexes
SHellium Sites
Toolbox