#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    1
    Rep 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.
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>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";

IMN logo majestic logo spyfu logo threadwatch logo seochat tools logo