<?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/13345" />

	<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>2007-04-08T18:27:50-04:00</updated>

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

		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-04-08T18:27:50-04:00</updated>

		<published>2007-04-08T18:27:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71928#p71928</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71928#p71928"/>
		<title type="html"><![CDATA[Using ? in HTTP grab sockets]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71928#p71928"><![CDATA[
The http package is part of the newer versions of tcl, so you should already have it, and its manpage http.html. There's tons of example scripts in the archives and in the forums about how to use the http package, I've written a lot of scripts using it so look around.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Sun Apr 08, 2007 6:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nara]]></name></author>
		<updated>2007-04-08T10:58:25-04:00</updated>

		<published>2007-04-08T10:58:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71921#p71921</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71921#p71921"/>
		<title type="html"><![CDATA[Using ? in HTTP grab sockets]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71921#p71921"><![CDATA[
I honestly have no knowledge of how the http package works or where to obtain it, hence my use of sockets.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8006">Nara</a> — Sun Apr 08, 2007 10:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-04-07T19:26:08-04:00</updated>

		<published>2007-04-07T19:26:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71894#p71894</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71894#p71894"/>
		<title type="html"><![CDATA[Using ? in HTTP grab sockets]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71894#p71894"><![CDATA[
I use ? in the weather script and it works.. Maybe the site you're trying to access is using POST method, not GET?<br><br>Here's an example of using POST from one of mc8's scripts (mcbanchan)<br><br>puts $sid "POST /report_bug.tcl HTTP/1.0\<br>\nHost: mc.purehype.net:80\<br>\nContent-type: application/x-www-form-urlencoded\<br>\nContent-Length: [expr [string length $query] +2]"<br>puts $sid \n$query<br><br><br>Here's an example from the weather script (using GET):<br><br>set webpage "/cgi-bin/findweather/getForecast?query=$location"<br>puts $wzsock "GET $webpage"<br><br><br>Why use the socket code anyway, when the http package gives you much more facility?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Sat Apr 07, 2007 7:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nara]]></name></author>
		<updated>2007-04-06T20:21:55-04:00</updated>

		<published>2007-04-06T20:21:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71867#p71867</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71867#p71867"/>
		<title type="html"><![CDATA[Using ? in HTTP grab sockets]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71867#p71867"><![CDATA[
Alright, I'm trying to access a server using this code:<br><div class="codebox"><p>Code: </p><pre><code>proc battle:flistenersdata { } {global shoutcast shoutport shoutpass url_ xml_ fd_ state_set url_ "/radiosite/modules.php?name=Nuke-Cast"set xml_ ""# Setting up timeout lengthafter 3000 set state_ timeoutset fd_ [socket -async CENSORED CENSORED]fconfigure $fd_ -buffering line -buffersize 1024fileevent $fd_ writable {puts $fd_ "GET $url_ HTTP/1.0\nUser-Agent: CENSORED (Mozilla Compatible)\n"while { ![eof $fd_] } {gets $fd_ lineappend xml_ $line}set state_ connected}vwait state_close $fd_after cancel set state_ timeoutreturn $xml_}</code></pre></div>However, I can only access this: /radiosite/modules.php. The ? in the url breaks the http grab. Do you have any ideas on fixing this? I have already tried a \.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8006">Nara</a> — Fri Apr 06, 2007 8:21 pm</p><hr />
]]></content>
	</entry>
	</feed>
