Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Accessing Files through http?

Reply
Thread Tools

Accessing Files through http?

 
 
Ron T.
Guest
Posts: n/a
 
      02-26-2007
I would just like to ask if there's a way I could somehow read the
contents of a text file that is posted online using Perl code? If so,
is it also possible to open the file if it has a login verification
before access? I know it might possibly involve the use of HTTP
modules, but I'm not too sure how to approach the security login
information.

If you can help out or maybe give me some pointers on where to look to
get started, I'd greatly appreciate it!

Thanks,
Ron Thompson

 
Reply With Quote
 
 
 
 
Paul Lalli
Guest
Posts: n/a
 
      02-26-2007
On Feb 26, 9:06 am, "Ron T." <rthompson...@gmail.com> wrote:
> I would just like to ask if there's a way I could somehow read the
> contents of a text file that is posted online using Perl code?


Yes.

perl -MLWP::Simple -le'getprint("http://example.com/foo.txt");'

> If so,
> is it also possible to open the file if it has a login verification
> before access?


Yes.
http://search.cpan.org/~gaas/libwww-...CTED_DOCUMENTS


Paul Lalli

 
Reply With Quote
 
 
 
 
gf
Guest
Posts: n/a
 
      02-26-2007
On Feb 26, 7:06 am, "Ron T." <rthompson...@gmail.com> wrote:
> I would just like to ask if there's a way I could somehow read the
> contents of a text file that is posted online using Perl code? If so,
> is it also possible to open the file if it has a login verification
> before access? I know it might possibly involve the use of HTTP
> modules, but I'm not too sure how to approach the security login
> information.


Check out the LWP Perl module on CPAN, and especially read the LWP
Cookbook.

After that, check out WWW::Mechanize as it's built on LWP and will
streamline a lot of what LWP does for you.

Greg


 
Reply With Quote
 
Ron T.
Guest
Posts: n/a
 
      02-26-2007
On Feb 26, 10:12 am, "Paul Lalli" <mri...@gmail.com> wrote:
> On Feb 26, 9:06 am, "Ron T." <rthompson...@gmail.com> wrote:
>
> > I would just like to ask if there's a way I could somehow read the
> > contents of a text file that is posted online using Perl code?

>
> Yes.
>
> perl -MLWP::Simple -le'getprint("http://example.com/foo.txt");'
>
> > If so,
> > is it also possible to open the file if it has a login verification
> > before access?

>
> Yes.http://search.cpan.org/~gaas/libwww-...pod#ACCESS_TO_...
>
> Paul Lalli


Thank you for the referrals, I really appreciate it! Seems like
exactly what I need

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing .xml files through rubyzip Graham Stokes Ruby 2 11-05-2006 02:12 PM
Accessing SQL Server 2000 through Cisco VPN Client disaia@earthlink.net Cisco 3 03-07-2005 12:26 PM
Adding items to listbox through java script then accessing through asp.net Brian Henry ASP .Net 5 08-03-2004 02:10 AM
Accessing files and directories through inodes R. Readi C Programming 2 07-23-2004 11:53 AM
accessing excel files through asp .net Aymer ASP .Net 1 11-09-2003 12:30 AM



Advertisments