<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/10378" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2005-08-30T09:03:21-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/10378</id>

		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2005-08-30T09:03:21-04:00</updated>

		<published>2005-08-30T09:03:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55037#p55037</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55037#p55037"/>
		<title type="html"><![CDATA['chunked' transfer encoding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55037#p55037"><![CDATA[
You could try changing all the "HTTP/1.1" strings to "HTTP/1.0" in the original script and seeing if that works.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Tue Aug 30, 2005 9:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kanibus]]></name></author>
		<updated>2005-08-28T17:21:32-04:00</updated>

		<published>2005-08-28T17:21:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54970#p54970</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54970#p54970"/>
		<title type="html"><![CDATA['chunked' transfer encoding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54970#p54970"><![CDATA[
so i am<strong class="text-strong"> <em class="text-italics">trying</em></strong> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing">  to do this with the tclhttp package demond was so kind to link me too, but i dont think i am doing it right. i get an error that says<br><blockquote class="uncited"><div>can't read "state(-urlencoding)": no such variable</div></blockquote>from<br><div class="codebox"><p>Code: </p><pre><code>set url "czleague.org/index.php?div=&amp;action=steamidsearch&amp;submit=1"set czid [::http::formatQuery steamid $string]        if {[catch {set tok [::http::geturl $url -query $czid]} error]} {                set text "An error occured while connecting to the CZL database."                putserv "NOTICE $ic :$text"                return        }        if {[::http::ncode $tok] != 200} {                set text "An error occured while connecting to the CZL database."                putserv "NOTICE $ic :$text"                ::http::cleanup $tok ; return        }        set thedata [::http::data $tok]</code></pre></div>and i have tried to define the urlencoding as utf-8 with ::http::config -urlencoding but that didnt work either. any help is appreciated.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6186">kanibus</a> — Sun Aug 28, 2005 5:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-26T17:52:05-04:00</updated>

		<published>2005-08-26T17:52:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54881#p54881</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54881#p54881"/>
		<title type="html"><![CDATA['chunked' transfer encoding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54881#p54881"><![CDATA[
I doubt there is one<br><br>Handling 'chunked' encoding the way Ofloo has written his stuff is not too easy, and the chance someone has done that for eggdrop purposes is slim to none<br><br>on the other hand, the http package that comes bundled with Tcl supports HTTP 1.0 only, and 'chunked' encoding is HTTP 1.1 feature<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Aug 26, 2005 5:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kanibus]]></name></author>
		<updated>2005-08-26T17:43:11-04:00</updated>

		<published>2005-08-26T17:43:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54880#p54880</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54880#p54880"/>
		<title type="html"><![CDATA['chunked' transfer encoding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54880#p54880"><![CDATA[
<blockquote class="uncited"><div><em class="text-italics">interj.</em><strong class="text-strong">no way</strong><br>    Used to express emphatic negation.</div></blockquote>actually thats the only definition of 'no way.' but thanks for your witty reply. i was asking if there was possibly<strong class="text-strong"> a script written already</strong> to decode chunked data so i could then just call that function as opposed to rewriting the whole script based off of a package.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6186">kanibus</a> — Fri Aug 26, 2005 5:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-26T17:22:12-04:00</updated>

		<published>2005-08-26T17:22:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54878#p54878</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54878#p54878"/>
		<title type="html"><![CDATA['chunked' transfer encoding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54878#p54878"><![CDATA[
if by "no way" you mean "there's nobody interested in wasting their time to patch a script that works on ONE version of ONE website only" - then I guess you are right<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Aug 26, 2005 5:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kanibus]]></name></author>
		<updated>2005-08-26T17:03:22-04:00</updated>

		<published>2005-08-26T17:03:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54877#p54877</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54877#p54877"/>
		<title type="html"><![CDATA['chunked' transfer encoding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54877#p54877"><![CDATA[
so there is no way to just add in the decoding? as ofloo is a bit difficult to reach atm.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6186">kanibus</a> — Fri Aug 26, 2005 5:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-26T04:14:57-04:00</updated>

		<published>2005-08-26T04:14:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54845#p54845</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54845#p54845"/>
		<title type="html"><![CDATA['chunked' transfer encoding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54845#p54845"><![CDATA[
tell Ofloo to rewrite his stuff using <a href="http://sourceforge.net/projects/tclhttp1-1/" class="postlink">tclhttp</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Aug 26, 2005 4:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kanibus]]></name></author>
		<updated>2005-08-26T03:34:59-04:00</updated>

		<published>2005-08-26T03:34:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54843#p54843</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54843#p54843"/>
		<title type="html"><![CDATA['chunked' transfer encoding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54843#p54843"><![CDATA[
hello im using a script to search a site, but the site recently changed over to using 'chunked' encoding. i was wondering how i would edit the following script to allow for this/decode the 'chunked' data. thanks.<div class="codebox"><p>Code: </p><pre><code>namespace eval steam {    variable search "!steamid"  variable flag "-|-"  variable hostname "czleague.org"  variable urlstring "/index.php?div=&amp;action=steamidsearch&amp;submit=1"  variable urldivision "/index.php?div=&amp;action=viewuser&amp;id="  proc steam_search {nick host hand chan arg} {    variable hostname    if {[regexp {^[\x20]{0,100}([0-9]{1,100})[\x20]{0,100}$} $arg -&gt; id]} {      if {[catch {socket -async $hostname 80} s]} {        putserv "NOTICE $nick :Sorry couldn't connect to the webserver."      } else {        fileevent $s writable [list [namespace current]::steam_callback $s $nick $chan $id]      }    } else {    putserv "NOTICE $nick :Invalid steam id."    }  }  proc steam_callback {s nick chan sid} {    variable urlstring; variable hostname    if {[string equal {} [fconfigure $s -error]]} {      fconfigure $s -translation crlf      flush $s      puts $s "POST $urlstring HTTP/1.1"      puts $s "Host: $hostname"      puts $s "Connection: Close"      puts $s "User-Agent: ofloo.net scripts"      puts $s "Content-Type: application/x-www-form-urlencoded"      puts $s "Content-Length: [expr 8 + [string bytelength $sid]]"      puts $s "Referer: ${hostname}${urlstring}\n"      puts $s "steamid=$sid"      flush $s      set switch 0      while {![eof $s]} {        gets $s x        if {[regexp -nocase {&lt;td valign="top"&gt;&lt;a href="index.php\?div=&amp;action=viewuser&amp;id=([0-9]{1,100})&amp;PHPSESSID=[0-9a-f]{32}"&gt;View&lt;/a&gt;&lt;/td&gt;} $x -&gt; id]} {          break        }      }    } else {    putserv "NOTICE $nick :Sorry couldn't connect to the webserver."    }    close $s    if {[info exists id]} {      if {[catch {socket -async $hostname 80} s]} {        putserv "NOTICE $nick :Sorry couldn't connect to the webserver."      } else {        fileevent $s writable [list [namespace current]::division_callback $s $nick $chan $sid $id]      }        } else {    putserv "NOTICE $nick :No results found for ${sid}."    }  }  proc division_callback {s nick chan sid id} {    variable urldivision; variable hostname    if {[string equal {} [fconfigure $s -error]]} {      puts $s "GET ${urldivision}${id} HTTP/1.1"      puts $s "Host: $hostname"      puts $s "Connection: Close"      puts $s "User-Agent: ofloo.net scripts"      puts $s "\n\r"      flush $s      while {![eof $s]} {        gets $s x        regexp -nocase {&lt;b&gt;Name:&lt;/b&gt; (.*?)&lt;br /&gt;} $x -&gt; name        regexp -nocase {&lt;b&gt;Alias:&lt;/b&gt; (.*?)&lt;br /&gt;} $x -&gt; alias        regexp -nocase {&lt;b&gt;SteamID:&lt;/b&gt; ([0-9]{1,100}:[0-9]{1,100}:[0-9]{1,100})&lt;br /&gt;} $x -&gt; steamid        if {[regexp -nocase {&lt;b&gt;Team:&lt;/b&gt; &lt;a href="(index.php\?div=czli&amp;action=viewteam&amp;id=[0-9]{1,100}&amp;PHPSESSID=[0-9a-f]{32})"&gt;(.*?)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;} $x -&gt; turl team]} {          set div "invite"          break        }        if {[regexp -nocase {&lt;b&gt;Team:&lt;/b&gt; &lt;a href="(index.php\?div=czlo&amp;action=viewteam&amp;id=[0-9]{1,100}&amp;PHPSESSID=[0-9a-f]{32})"&gt;(.*?)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;} $x -&gt; turl team]} {          set div "open"          break        }        if {[regexp -nocase {&lt;b&gt;Team:&lt;/b&gt; &lt;a href="(index.php\?div=czlm&amp;action=viewteam&amp;id=[0-9]{1,100}&amp;PHPSESSID=[0-9a-f]{32})"&gt;(.*?)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;} $x -&gt; turl team]} {          set div "main"          break        }      }      if {[info exists name] &amp;&amp; [info exists alias] &amp;&amp; [info exists steamid] &amp;&amp; [info exists team]} {        putserv "NOTICE $nick :CZL\($steamid\) Name: $name Alias: $alias Team: $team\($div\) MoreInfo: http://$hostname/$turl"      } else {      putserv "NOTICE $nick :Sorry $nick no results for ${sid}."      }    } else {    putserv "NOTICE $nick :Sorry couldn't connect to the webserver."    }    close $s  }  bind pub $flag $search [namespace current]::steam_search}</code></pre></div>thanks for your help <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6186">kanibus</a> — Fri Aug 26, 2005 3:34 am</p><hr />
]]></content>
	</entry>
	</feed>
