|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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.
|
|
#2
|
|||
|
|||
|
>>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"; |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Read file from different URL. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|