CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Read (html) file from other server

 



mmcw
User

May 9, 2000, 8:55 AM

Post #1 of 6 (934 views)
Read (html) file from other server Can't Post

Hello,

Does anyone know how to read a html file from an other server and write it to my server.

For example I want to read the page:
http://www.yahoo.com to my server at:
http://www.test.nl/yahoo.html

I already tried (with success) the following:

# read en write currency convert file from www.yahoo.com
use LWP::Simple;
$rc = getstore($output_url,$output_file);

where: $output_url = http://www.yahoo.com
and: $output_file = /home/test/test.html

This workes fine but I want to use the script at a server where this module (LWP::Simple) is not installed.
Does anyone know if it is possible to do a thing like this without any modules or with standard modules!!

I need help urgently!!


Jasmine
Administrator

May 9, 2000, 9:30 AM

Post #2 of 6 (934 views)
Re: Read (html) file from other server [In reply to] Can't Post

(Your duplicate post in the Advanced forum has been deleted).


You can install LWP in your user directory. You can "cheat" by downloading the LWP suite and creating a subdirectory (named LWP) in the directory that your program resides in. Then, upload Simple.pm into that directory. If there are any other LWP files that Simple.pm relies on, upload those, too.

I'm not aware of any other way to do what you need without LWP.


Neo_Matrix
Deleted

May 9, 2000, 6:26 PM

Post #3 of 6 (934 views)
Re: Read (html) file from other server [In reply to] Can't Post

Hey I've just been getting into Perl. I am a C++, VB, HTML, JavaScript programmer and learning Perl now. My main is C++. But I would like to know if you guys know of any other great sites on teh internet with tutorials and sample scripts. Also what is LWP and where can I download it. From the sound of what it does, it sounds like a library of functions. Let me know. Thanks a lot.

Mike


perlkid
stranger

May 10, 2000, 2:30 AM

Post #4 of 6 (934 views)
Re: Read (html) file from other server [In reply to] Can't Post

  
You can find a few versions of lwp here http://www.cpan.org/modules/01modules.index.html

But it comes with perl so if perl is installed on your server you probably have it.

As for tutorials:

Try this one http://agora.leeds.ac.uk/Perl/start.html

A great list is here http://www.perl.com/reference/query.cgi?tutorials

My favorite tutorial is at http://www.cgi101.com

perlkid


Cure
User

May 13, 2000, 11:39 AM

Post #5 of 6 (934 views)
Re: Read (html) file from other server [In reply to] Can't Post

Hi mmcw, you could use the socket module to read a html file from an other server and write it to my server.

You will have to use a module know matter what. so you have 2 options LWP or Socket module


Cure


mmcw
User

May 14, 2000, 10:53 AM

Post #6 of 6 (934 views)
Re: Read (html) file from other server [In reply to] Can't Post

I know!
Someone else told me also!

I am working on it.

Could you help me with some code??

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives