Re: [PHP] Reading remote, script-generated files

2003-08-14 Thread Matt Daleo
Matt Daleo [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Analysis  Solutions [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  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 NYv: 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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Reading remote, script-generated files

2003-08-14 Thread Jay Blanchard
[snip]
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. I've tried using the built-in PHP
commands (file, fget, fopen, fsockopen) as well as the Snoopy fetch
classes (http://snoopy.sourceforge.net). Any ideas?
[/snip]

Try cURL http://us2.php.net/curl

Have a pleasant and productive day

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Reading remote, script-generated files

2003-08-14 Thread Analysis Solutions
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 NYv: 718-854-0335   f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Reading remote, script-generated files

2003-08-14 Thread Matt Daleo
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. I've tried using the built-in PHP
commands (file, fget, fopen, fsockopen) as well as the Snoopy fetch
classes (http://snoopy.sourceforge.net). Any ideas?

Thanks.

MD



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Reading remote, script-generated files

2003-08-14 Thread Matt Daleo
Analysis  Solutions [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 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 NYv: 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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php