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

	<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>2015-02-07T15:10:37-04:00</updated>

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

		<entry>
		<author><name><![CDATA[alkoleht]]></name></author>
		<updated>2015-02-07T15:10:37-04:00</updated>

		<published>2015-02-07T15:10:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103463#p103463</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103463#p103463"/>
		<title type="html"><![CDATA[help with TCL fetching HTML code and HTTP 302]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103463#p103463"><![CDATA[
Hi.<br><br>I use web based php scripts that my bot reads and processes using simple regexp<br>It was working perfectly till recently i started running into HTTP 302 code and it broke my script, apparently my webhost did something on theyr side. The script uses procs that generate url, depending on proc used, that is passed to engine that connects and returns the html code to main proc. Then the proc processes the returned html code using simple regexp.<br><br>I am still complete noob when it comes to tcl so need help dealing with HTTP 302<br>Here is my very basic and simple engine that fetches html from URL passed to it:<br><div class="codebox"><p>Code: </p><pre><code>proc proc:engine {url} {set agent "Mozilla/4.75 (X11; U; Linux 2.2.17; i586; Nav)"set http [::http::config -useragent $agent -urlencoding "utf-8"]catch { set http [::http::geturl $url -timeout 50000]} errorset html [::http::data $http]return $html}</code></pre></div>Can anyone help me to fix it please?<br><br>Thank you<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11706">alkoleht</a> — Sat Feb 07, 2015 3:10 pm</p><hr />
]]></content>
	</entry>
	</feed>
