jsp123

http://www.unsoughtinput.com/index.

php

 /2006/11/01/weird-errors-fix-timeout-issues-in-curl-

php

 -and-

apache

 /

I never knew about the flush() function in

php

 , also I never set the timeouts for curl which is definitely going to be helpful for scraping overture or using proxies.  Applause

perkiset

Flush is powerful, and can be used to great GUI effect if what you "flush" is a little bit of

javascript

  that updates a DIV on your page. For example:

<script>document.getElementById('status').innerHTML='Done with step 1';</script>

... everytime you hit a milestone in your code, you can send this on a long procedure. There is a little problem though in that some browsers will not start to render until a certain amount of answer comes back from the server - I've heard that 1024 bytes is a good marker... if you find that you are getting troubles with seeing your flushed data, then send 1K of comments (either HTML or js, I don't think it matters) and see if you get a different result.

@ timeouts - race conditions and timeouts are the frigging bane of my existence at times. Totally understand.

/p


Perkiset's Place Home   Politics @ Perkiset's