Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this message"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
Post Follow-up to this messageOn 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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.