Re: Reading remote, script-generated files

From: Date: Tue, 12 Aug 2003 23:17:43 +0000
Subject: Re: Reading remote, script-generated files
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-159360@lists.php.net to get a copy of this message
"Matt Daleo" <azdaleo@yahoo.com> wrote in message news:20030812212307.76217.qmail@pb1.pair.com... > "Analysis & Solutions" <danielc@analysisandsolutions.com> wrote in message > news:20030812195452.GC10290@panix.com... > > Hey Matt: > > > > On Tue, Aug 12, 2003 at 10:07:10AM -0700, Matt Daleo wrote: > > > I'm attempting to read a remote file and parse it for data. The problem > I've > > > having is that the file seems to be generated by Perl > > > (http://alert.dot.pima.gov/scripts/1brpssd.pl) and when I read it the > > > script-generated portion is not available. When I view the page with a > > > browser it is displayed just fine. > > > > Sounds like their CGI is snooping which browser you're using. If you're > > opening the file via http, then the server should send you everything a > > browser would see. > > > > But, do note, that web page is wacked out. I just took a look at it in > > Mozilla and while the HTML downloaded, it wouldn't render. So, they seem > > to not quite know what they're doing. Then, going up to > > http://alert.dot.pima.gov/ produced a JavaScript redirect, > > so they REALLY > > don't know what they're doing. > > > > --Dan > > > > -- > > FREE scripts that make web and database programming easier > > http://www.analysisandsolutions.com/software/ > > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > I've discovered another odd characteristic of this site that might help > determine the problem. When you go directly to that page there is no data. > Not with cURL, not with fopen, not even with IE or Mozilla. If you go in > through the main page, then go to the data page it works fine.(Start at > http://alert.dot.pima.gov/scripts/Pima.pl, click on the map, > click on the > "Group Hourly..." link.) Is it possible that they are using sessions or > something? Is there a way to look at the headers to find out? This might > also help determine if it's checking for a particular browser. > > Thanks. > > M > > I've figured it out. The HTML headers need to read as follows: GET /scripts/1brpssd.pl HTTP/1.1 Host: alert.dot.pima.gov Cookie: pimafile=-Inetpub-Scripts-DWTemp-config1060728166.txt It looks to me like they're using a cookie to activate a script of some kind. If anyone can tell me what's really going on here, I'd appreciate the explanation. Thanks. M

« previous php.general (#159360) next »