FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > General Coding/Development
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 05-11-2000, 02:24 PM   Postid: 20219
telecsan
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: May 2000
Location: Reynoldsburg, Ohio, USA
Posts: 3
html into perl

I've read plenty of stuff on how to create html content with a perl script, but is there a way to pull in a remote html page into a perl script?
telecsan is offline   Reply With Quote
Old 05-11-2000, 03:24 PM   Postid: 20220
jokesplus
Site Owner
 
jokesplus's Avatar

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: May 1999
Location: Cheltenham, UK
Posts: 149
Try

use LWP::Simple;
$content = get($URL);

If it gets more complex you'll probably want to explore the LWP documentation @ http://www.linpro.no/lwp/

Jarrod

------------------
From blonde jokes to yo mamma
http://www.jokesplus.com
jokesplus is offline   Reply With Quote
Old 05-12-2000, 07:27 AM   Postid: 20221
telecsan
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: May 2000
Location: Reynoldsburg, Ohio, USA
Posts: 3
That actually worked pretty well.  But is it possible with that to send a user name and password as well?  (Local server requires user name and passwd to get out to the internet...)
telecsan is offline   Reply With Quote
Old 05-12-2000, 11:44 AM   Postid: 20222
jokesplus
Site Owner
 
jokesplus's Avatar

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: May 1999
Location: Cheltenham, UK
Posts: 149
Yes LWP can send a user name and password details.  However, haven't personally used it.  If you visit the LWP web-site they have some sample scripts...you might be able to find one to copy.  Sorry can't be of more help.

Jarrod
jokesplus is offline   Reply With Quote
Old 05-12-2000, 04:04 PM   Postid: 20223
Justin
Visitor
 
Justin's Avatar

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Jan 1999
Location: Kissimmee, FL
Posts: 3,672
A simply (and *NOT* very secure) way to authenticate is this:

http://username:password@www.domain....h/to/file.html

This will cause you to be logged in, but keep in mind that you would have to add the auth info for each URL you visit within the protected area (eg, images etc).

Hope this helps.

------------------
Justin Nelson
FutureQuest Support
Justin is offline   Reply With Quote
Old 05-12-2000, 10:47 PM   Postid: 20224
sumengen
Visitor
 
sumengen's Avatar

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Mar 2000
Posts: 127
using LWP::UserAgent you can access protected directories. Here is an example from LWP-cookbook
http://theoryx5.uwinnipeg.ca/CPAN/da...l/lwpcook.html


Code Sample:

  use LWP::UserAgent;
  $ua = LWP::UserAgent->new;
  $req = HTTP::Request->new(GET => 'http://www.linpro.no/secret/');
  $req->authorization_basic('aas', 'mypassword');
  print $ua->request($req)->as_string;




------------------
*****************
Baris Sumengen
*****************
sumengen is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 06:34 PM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.