Retrieving and parsing file from another server

Results 1 to 3 of 3

Thread: Retrieving and parsing file from another server

  1. #1
    Join Date
    Dec 1969

    Default Retrieving and parsing file from another server

    I have a situation where I need to retrieve a text file from an external web server and parse it. Anyone have any idea how I can retrieve it, write it to my web server and then parse it?<BR><BR>The setup on the other server is like this:<BR><BR>I have no ability to change neither the structure nor the file name. It is manually created on their side. But I want to get it and pull some titles and links out of it. Any help will be appreciated.<BR><BR>John<BR>

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQs, category Networking

    The link to the ASPFAQs is at the top right corner of most every page on this site, including the page you are reading right now.<BR><BR>In this case:<BR><BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: ASPFAQs, category Networking

    Can you use Perl on you server? I once use the getstore function to grab the file and then accessed that file on my server to prase it.<BR><BR>Something like this, remember this is Perl<BR>#!/usr/bin/perl<BR>use CGI;<BR>use LWP::Simple;<BR>$query = CGI::new();<BR>&#039;$homepage = &#039;d:/html/users/path/to/filename.txt&#039;;<BR>&#039;$status = getstore(&#039;http://www.the_URL&#039;,$homepage);<BR><BR>print $query-&#062; header();<BR>print $query-&#062;p("YEAH, you got it") if is_success($status);<BR><BR>Remember you have to use the absolute path to were you want to store the file. The $homepage is the var. that will tell the getstore to put the file as well as name it.<BR><BR>Then you can access the file and parse with an ASP all you like.<BR>Hope this helped out in some way. I only added Perl in the response becuase not all servers let you make you own componets hope I did not offend anybody.<BR><BR>Stephen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts