SunQuest
           Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old June 25th, 2000, 08:35 PM
Matador Matador is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 1 Matador User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Is there any way to read an XML file from a different URL with perl? I am trying to figure out a way to open and XML file that resides at http://url_1/ so that I can process it and display the organized information. My perl script is on a different URL (http://url_2/) than the XML file.

Reply With Quote
  #2  
Old June 27th, 2000, 02:40 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>I am trying to figure out a way to open and XML file that resides at http://url_1/

You can't open any files reside on someone else's server. Imagine if you can, then you can steal any scripts from anywhere. However, you can GET the OUTPUT of that file on a different URL. Hint, just the OUTPUT of it only.

Again, you need to download->http://www.perl.com/CPAN-local/modules/by-module/LWP/libwww-perl-5.48.tar.gz and Read->http://www.perl.com/CPAN-local/modules/by-module/LWP/libwww-perl-5.48.readme

#!/usr/local/bin/perl
print "Content-type: text/htmlnn";
use LWP::Simple;
$target_file = "http://url_1/xml_file";
my $file = get($target_file);
print "$filen";

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Read file from different URL.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway