php request url without waiting for response -
i'm trying variation of file_get_content without waiting content. i'm requesting php script in different url download large file, don't want wait file finish loading. has idea?
thank you!
try on script download file:
//erase output buffer ob_end_clean(); //tell browser connection's closed header("connection: close"); //ignore user's abort. ignore_user_abort(true); //extend time limit 30 minutes set_time_limit(1800); //extend memory limit 10mb ini_set("memory_limit","10m"); //start output buffering again ob_start(); //tell browser we're serious... there's //nothing else receive page. header("content-length: 0"); //send output buffer , turn output buffering off. ob_end_flush(); //yes... flush again. flush(); //close session. session_write_close(); // download script goes here !!!
stolen from: http://andrewensley.com/2009/06/php-redirect-and-continue-without-abort/
Comments
Post a Comment