I'm trying to run PHP code in a Facebook application, but it gives a blank screen for 20 seconds or so. The PHP code is not efficient I know this, but I can't change it, it's because of some queries.
I'm looking for a way to have the HTML page printed on the screen before the PHP code is finished.
I tried everything from inserting flush()
, ob_flush()
statements within the PHP code, so it would print the HTML already... I tried adjusting the php.ini file because I read that it's possible that the server doesn't react to flush()
statements etc. and that you have to change it there (my server is with GoDaddy), but that didn't work either!
So I'm looking for a way to have my HTML page on screen and reference to a PHP code that runs in the background, that way my users don't have to stare at a blank screen.