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

	<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-11-01T19:38:02-04:00</updated>

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

		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-11-01T19:38:02-04:00</updated>

		<published>2007-11-01T19:38:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77376#p77376</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77376#p77376"/>
		<title type="html"><![CDATA[REQ: maybe someone knows how to do this]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77376#p77376"><![CDATA[
Saved for future reference, thanks User <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=7395">rosc2112</a> — Thu Nov 01, 2007 7:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2007-11-01T07:00:13-04:00</updated>

		<published>2007-11-01T07:00:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77345#p77345</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77345#p77345"/>
		<title type="html"><![CDATA[REQ: maybe someone knows how to do this]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77345#p77345"><![CDATA[
<blockquote class="uncited"><div>If I knew how to make a script log in to a website, then retrieving data from these boards would be fairly simple. Other people have made similar requests, but I've yet to see any example script that can log in to the website to be able to pull data from them.</div></blockquote>There's no standard way to log in to a website... In phpBB, all you need to do is post the login form and you get redirected to a url with a session ID in it.<div class="codebox"><p>Code: </p><pre><code># usage: getegghelp &lt;yourUsername&gt; &lt;yourPassword&gt; [theDesiredDestinationUri]# returns: url based on uri with appended session idproc getegghelp {user pass {uri ""}} {set     Q {}lappend Q username $userlappend Q password $passlappend Q redirect $urilappend Q login "Log in";# required by phpbbset t [http::geturl http://forum.egghelp.org/login.php -query [eval http::formatQuery $Q]]if {[http::ncode $t]==302} {upvar #0 $t sarray set h $s(meta)http::cleanup $tset h(Location)} else {error "failed?"}}getegghelp rosc2112 password /search.php?search_id=newposts</code></pre></div>Other sites might require cookies (store cookies recieved in the header field "Set-Cookie" and send it out in subsequent requests using "-headers {Cookie $theCookie}") or WWW-Authentication (you'll get a 401 when loading the page with no/wrong Authorization header (-headers {Authorization "Basic [base64encode user:pass]"}))<br><br>EDIT: here's some code to demonstrate BASIC authentication:<div class="codebox"><p>Code: </p><pre><code>proc geturlauth {url args} {# parse the url to extract user:passif {![regexp -- {^([a-z]+://)?(?:([^@/]+)@)?(.+)$} $url url prefix login rest]} {error "Invalid url"}if {$login==""} {error "Don't use it if you don't need it ;)"}array set o $argslappend o(-headers) "Authorization" "Basic [b64e $login]"eval http::geturl [list $prefix$rest] [array get o]}# base64encode based on RS's proc in the tcl wikiproc b64e str {binary scan $str B* bitsswitch [expr {[string len $bits]%6}] {2 {append bits 0000==}4 {append bits 00=}}string map {000000 A 000001 B 000010 C 000011 D 000100 E 000101 F000110 G 000111 H 001000 I 001001 J 001010 K 001011 L001100 M 001101 N 001110 O 001111 P 010000 Q 010001 R010010 S 010011 T 010100 U 010101 V 010110 W 010111 X011000 Y 011001 Z 011010 a 011011 b 011100 c 011101 d011110 e 011111 f 100000 g 100001 h 100010 i 100011 j100100 k 100101 l 100110 m 100111 n 101000 o 101001 p101010 q 101011 r 101100 s 101101 t 101110 u 101111 v110000 w 110001 x 110010 y 110011 z 110100 0 110101 1110110 2 110111 3 111000 4 111001 5 111010 6 111011 7111100 8 111101 9 111110 + 111111 /} $bits}</code></pre></div>Use it like http::geturl, but include user:pass@ in front of the host<br>(geturlauth <a href="http://user:pass@some.site/" class="postlink">http://user:pass@some.site/</a>)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Nov 01, 2007 7:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-10-31T14:10:08-04:00</updated>

		<published>2007-10-31T14:10:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77317#p77317</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77317#p77317"/>
		<title type="html"><![CDATA[REQ: maybe someone knows how to do this]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77317#p77317"><![CDATA[
If I knew how to make a script log in to a website, then retrieving data from these boards would be fairly simple. Other people have made similar requests, but I've yet to see any example script that can log in to the website to be able to pull data from them.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Oct 31, 2007 2:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[wckdkl0wn]]></name></author>
		<updated>2007-10-28T20:32:55-04:00</updated>

		<published>2007-10-28T20:32:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77233#p77233</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77233#p77233"/>
		<title type="html"><![CDATA[REQ: maybe someone knows how to do this]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77233#p77233"><![CDATA[
i looked fora  script but couldnt find one. maybe someone knows of one and can point me towards it. but i am looking for a script that will look on a phpbb forum and reply back to the channel its in with the like top 3 or 5 new posts made. maybe an option to display the current users logged on. or perhaps the daily site visits. anyone know of any script that can do this?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9355">wckdkl0wn</a> — Sun Oct 28, 2007 8:32 pm</p><hr />
]]></content>
	</entry>
	</feed>
