[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



I wouldn't necessarily categorize either as "newer" or "older".  The
type that works using the browser popup is using authentication at the
HTTP layer; the other scheme is to handle it in the application layer
using cookies or some other form session id (e.g. something embedded
in the URL).  Both have been around for ages; however handling it in
the application has advantages (for instance being able to offer a way
for the user to logout, since pretty much Opera's the only browser
that offers a way to discard HTTP auth credentials short of quitting
the browser) and is the way most people tend do things nowdays.

As for automating it, you basically will have to submit (POST) the
filled in login page form to the browser and accept any cookies that
sends back and then send those same cookies along when you try to
access a protected page.  Perl (of course :) has the WWW::Mechanize
module which sits on top of LWP and provides support for this type of
thing.  If you're doing any heavy spidering Mechanize already knows
how to do a bunch of the gruntwork you'd have to reimplement
yourself.

<a  rel="nofollow" href="http://search.cpan.org/~petdance/WWW-Mechanize-1.12/lib/WWW/Mechanize.pm";>http://search.cpan.org/~petdance/WWW-Mechanize-1.12/lib/WWW/Mechanize.pm</a>

-- 
Fletch                | &quot;If you find my answers frightening,       __`'/|
fletch at phydeaux.org|  Vincent, you should cease askin'          \ o.O'
                      |  scary questions.&quot; -- Jules                =(___)=
                      |                                               U


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00441" href="msg00441.html">[ale] Opening a webpage with a password?</a></strong>
<ul><li><em>From:</em> Robert.L.Harris at rdlg.net (Robert L. Harris)</li></ul></li>
<li><strong><a name="00442" href="msg00442.html">[ale] Opening a webpage with a password?</a></strong>
<ul><li><em>From:</em> christopher at bergeron.com (Christopher Bergeron)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00448.html">[ale] User training</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00450.html">[ale] RE: suse 9.2 yast2 - printer media source setting - Solved</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00442.html">[ale] Opening a webpage with a password?</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00443.html">[ale] Opening a webpage with a password?</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00449"><strong>Date</strong></a></li>
<li><a href="threads.html#00449"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>