Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Using perl how do you write a script to copy a remote file into your own site
Using perl how do you write a script to copy a remote file into your
own site. In my situation want to copy a rss feed from
http://remoteserver/news.xml for example.

Marcos

Report this thread to moderator Post Follow-up to this message
Old Post
ARGENTINA
12-29-04 08:57 PM


Re: Using perl how do you write a script to copy a remote file into your own site
"ARGENTINA" <sjprec@yahoo.com> wrote in message
news:f2747eca.0412290510.f238d00@posting.google.com...
> Using perl how do you write a script to copy a remote file into your
> own site. In my situation want to copy a rss feed from
> http://remoteserver/news.xml for example.

http://search.cpan.org is usually a good place to start.

For just saving a file off the web, I would recommend using LWP::Simple.
For working with RSS feeds, go to the above site and search for RSS, and
use whichever module looks best suited to your task.

Paul Lalli


Report this thread to moderator Post Follow-up to this message
Old Post
Paul Lalli
12-29-04 08:57 PM


Re: Using perl how do you write a script to copy a remote file into your own site
On 29 Dec 2004 05:10:08 -0800, sjprec@yahoo.com (ARGENTINA) wrote:

>Using perl how do you write a script to copy a remote file into your
>own site. In my situation want to copy a rss feed from
>http://remoteserver/news.xml for example.
>
>Marcos


use LWP::Simple;

# The following functions are provided (and exported) by this module:

get($url)
# The get() function will fetch the document identified by the given
# URL and return it. It returns undef if it fails. The $url argument
# can be either a simple string or a reference to a URI object.

head($url)
# Get document headers. Returns the following 5 values if successful:
# ($content_type, $document_length, $modified_time, $expires, $server)

getprint($url)
# Get and print a document identified by a URL. The document is
# printed to the selected default filehandle for output (normally
# STDOUT) as data is received from the network. If the request fails,
# then the status code and message are printed on STDERR. The return
# value is the HTTP response code.

getstore($url, $file)
# Gets a document identified by a URL and stores it in the file. The
# return value is the HTTP response code.



jbl



Report this thread to moderator Post Follow-up to this message
Old Post
jbl
12-30-04 08:58 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Miscellaneous archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:53 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.