
June 7th, 2000, 09:33 AM
|
|
Junior Member
|
|
Join Date: Jun 2000
Posts: 8
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Apologies if this has been answered before...
I am trying to read the contents of a text file using php. . I know the location of the file as an encoded form post to a perl script. My dumb vendor will not reveal the path to my own log files for the script we have purchased from them! Anyway, I tried the following unsuccessfully:
<?PHP
$file = "http://congress.nw.dc.us/cgi-bin/usagelogs.pl?download=1&dir=lchr&logfile=senders030100.txt&textfile=%20Text%20File%28s%29%20";
$file_content = fread(fopen($file, "r"), filesize($file));
echo "$file_content";
?>
the url above will trigger the download messagebox in IE when entered into the browser... Any ideas on how to fix this?
Many thanks!
|