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

	<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>2004-01-16T18:57:07-04:00</updated>

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

		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2004-01-16T18:57:07-04:00</updated>

		<published>2004-01-16T18:57:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32586#p32586</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32586#p32586"/>
		<title type="html"><![CDATA[[SOLVED]Returning the first X characters from a remote file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32586#p32586"><![CDATA[
Hmm... not sure if it will work, but there is a way to pass additional headers to the geturl command. So you can use the http range header to get only the first few bytes if you want.<br><br>Something like this:<br><div class="codebox"><p>Code: </p><pre><code>set myurl "http://blah.com/horse.jpg"set token [::http::geturl $myurl -headers [list "Range" "bytes=0-10"]]set content [::http::data $token]</code></pre></div>It should work, especially if your server supports the Range header (I think most do these days, for static files).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Fri Jan 16, 2004 6:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Aron]]></name></author>
		<updated>2004-01-11T16:21:42-04:00</updated>

		<published>2004-01-11T16:21:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32443#p32443</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32443#p32443"/>
		<title type="html"><![CDATA[[SOLVED]Returning the first X characters from a remote file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32443#p32443"><![CDATA[
well, that is basically what i am doing already.<br><br>here's the situation:<br><br>Lately, a lot of people seem to have a lot of fun by spamming virus .jpg or images.<br>I created a script that will use something similiar to the code above to extract the headers, and check if they are actually a JPG file.<br><br>It works fine, but it stops working with very large JPGs... any idea what might be causing this?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2858">Aron</a> — Sun Jan 11, 2004 4:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2004-01-11T16:02:31-04:00</updated>

		<published>2004-01-11T16:02:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32442#p32442</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32442#p32442"/>
		<title type="html"><![CDATA[[SOLVED]Returning the first X characters from a remote file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32442#p32442"><![CDATA[
The plain simple way:<div class="codebox"><p>Code: </p><pre><code>package require httpset myurl "http://www.google.com/"set token [::http::geturl $myurl]set content [::http::data $token]::http::cleanup $content# and extract stuff from $content</code></pre></div>Ps: Place the "package require http" line outside your proc.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sun Jan 11, 2004 4:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Aron]]></name></author>
		<updated>2004-01-12T09:46:17-04:00</updated>

		<published>2004-01-11T14:48:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32440#p32440</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32440#p32440"/>
		<title type="html"><![CDATA[[SOLVED]Returning the first X characters from a remote file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32440#p32440"><![CDATA[
I already looked for something in the http package manual on how to do this, but i cant figure it out...<br><br>I only want to read the first 5 characters from a file or something.. Anyone have a clue on how to realize this?<br><br>Thanks in advance.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2858">Aron</a> — Sun Jan 11, 2004 2:48 pm</p><hr />
]]></content>
	</entry>
	</feed>
