Re: [PEAR] Re: HTTP_Download to track amount of bytes downloaded help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i forgot to add: pressing go has the same effect as refresh.


On Thu, 17 Mar 2005 12:20:12 +0100, Ken <kenkam@xxxxxxxxx> wrote:
> On Thu, 17 Mar 2005 12:19:38 +0100, Ken <kenkam@xxxxxxxxx> wrote:
> > Header for download script
> > ****************************************
> > http://localhost/download.php?fid=1&SID=bb9309b20034a71e4c59382028afd1c3&user=strikers
> >
> > GET /download.php?fid=1&SID=bb9309b20034a71e4c59382028afd1c3&user=strikers
> > HTTP/1.1
> > Host: localhost
> > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)
> > Gecko/20050225 Firefox/1.0.1
> > Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> > Accept-Language: en-us,en;q=0.5
> > Accept-Encoding: gzip,deflate
> > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> > Keep-Alive: 300
> > Connection: keep-alive
> > Referer: http://localhost/?item=repository&cat=2
> > Cookie: wordpressuser_86a9106ae65537651a8e456835b316ab=admin;
> > GALLERYSID=c8dd063a064de9c093628f3e5ebc9f1c;
> > wordpresspass_86a9106ae65537651a8e456835b316ab=0f2f790150e18652ee1c7ff3deb39670;
> > comment_author_86a9106ae65537651a8e456835b316ab=Administrator;
> > comment_author_email_86a9106ae65537651a8e456835b316ab=kenkam%40gmail.com;
> > visited=y; userdetails[unique]=2ab983fb60321d8de1045100c656cf5e;
> > userdetails[username]=strikers; userdetails[loggedin]=y;
> > phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A32%3A%221a1dc91c907325c69271ddf0c944bc72%22%3Bs%3A6%3A%22userid%22%3Bi%3A2%3B%7D;
> > PHPSESSID=bb9309b20034a71e4c59382028afd1c3;
> > phpbb2mysql_sid=5e345aa85f774eeece28ecae74742716;
> > phpbb2mysql_t=a%3A1%3A%7Bi%3A12%3Bi%3A1111057793%3B%7D
> >
> > HTTP/1.x 200 OK
> > Date: Thu, 17 Mar 2005 11:10:04 GMT
> > Server: Apache/2.0.49 (Win32) PHP/4.3.10
> > X-Powered-By: PHP/4.3.10
> > Pragma: cache
> > Cache-Control: public, must-revalidate, max-age=0
> > Accept-Ranges: bytes
> > x-sent-by: PEAR::HTTP::Download
> > content-disposition: attachment; filename="KPM1.avi"
> > Etag: "2063849717d32dd19e534b77cabac517--856247520"
> > Content-Length: 0
> > Keep-Alive: timeout=15, max=84
> > Connection: Keep-Alive
> > Content-Type: application/x-octetstream
> > *********** END ************
> >
> > And after I refresh the page:
> > ***********************************************
> > http://localhost/?item=repository&cat=2
> >
> > GET /?item=repository&cat=2 HTTP/1.1
> > Host: localhost
> > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)
> > Gecko/20050225 Firefox/1.0.1
> > Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> > Accept-Language: en-us,en;q=0.5
> > Accept-Encoding: gzip,deflate
> > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> > Keep-Alive: 300
> > Connection: keep-alive
> > Referer: http://localhost/?item=repository&cat=1
> > Cookie: wordpressuser_86a9106ae65537651a8e456835b316ab=admin;
> > GALLERYSID=c8dd063a064de9c093628f3e5ebc9f1c;
> > wordpresspass_86a9106ae65537651a8e456835b316ab=0f2f790150e18652ee1c7ff3deb39670;
> > comment_author_86a9106ae65537651a8e456835b316ab=Administrator;
> > comment_author_email_86a9106ae65537651a8e456835b316ab=kenkam%40gmail.com;
> > visited=y; userdetails[unique]=2ab983fb60321d8de1045100c656cf5e;
> > userdetails[username]=strikers; userdetails[loggedin]=y;
> > phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A32%3A%221a1dc91c907325c69271ddf0c944bc72%22%3Bs%3A6%3A%22userid%22%3Bi%3A2%3B%7D;
> > PHPSESSID=bb9309b20034a71e4c59382028afd1c3;
> > phpbb2mysql_sid=5e345aa85f774eeece28ecae74742716;
> > phpbb2mysql_t=a%3A1%3A%7Bi%3A12%3Bi%3A1111057793%3B%7D
> > Cache-Control: max-age=0
> >
> > HTTP/1.x 200 OK
> > Date: Thu, 17 Mar 2005 11:10:10 GMT
> > Server: Apache/2.0.49 (Win32) PHP/4.3.10
> > X-Powered-By: PHP/4.3.10
> > Cache-Control: no-store, no-cache, must-revalidate, max-age=0
> > Pragma: no-cache
> > Expires: Sat, 01 Jan 2000 00:00:00 GMT
> > Set-Cookie: visited=y; expires=Fri, 18-Mar-2005 11:10:10 GMT
> > Keep-Alive: timeout=15, max=80
> > Connection: Keep-Alive
> > Transfer-Encoding: chunked
> > Content-Type: text/html; charset=ISO-8859-1
> > ****************END*****************
> >
> > I strongly believe that this is a ffox problem. It does not happen at
> > all with IE...
> >
> > Ken
> >
> > On Thu, 17 Mar 2005 11:43:27 +0100, Michael Wallner <mike@xxxxxxx> wrote:
> > > Hi Ken, you wrote:
> > >
> > > > Thanks for the reply
> > > > Second thing:
> > > > I am getting errors from refreshing the page after I cancel the download:
> > > >
> > > > Warning: fseek(): supplied argument is not a valid stream resource in
> > > > C:\php\pear\HTTP\download.php on line 849
> > > >
> > > > Warning: fread(): supplied argument is not a valid stream resource in
> > > > C:\php\pear\HTTP\download.php on line 855
> > > >
> > > > I am using firefox 1.01... i don't know if its firefox or not (since
> > > > ie doesn't seem to have the error).
> > > >
> > > > I fixed it by adding @ in front of fseek and fread... would this have
> > > > an effect on the performance?
> > >
> > > Yes a tiny bit, which should be neglible for downloads...
> > >
> > > However, the HTTP headers you receive when this happens may help a
> > > lot (which shouldn't be too hard to discover with livehttpheaders).
> > >
> > > Does the same error occur if you hit "Go" instead of "Refresh"?
> > >
> > > Thanks,
> > > --
> > > Michael - < mike(@)php.net >
> > >
> > >
> > >
> >
>

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux