June 25th, 2000, 09:35 PM
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.
June 27th, 2000, 03:40 PM
>>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
print "Content-type: text/htmlnn";
$target_file = "http://url_1/xml_file";
my $file = get($target_file);