[pmwiki-devel] [pmwiki-users] Newsletter throttling

The Editor editor at fast.st
Thu Nov 2 17:31:46 CST 2006


I tried this alternate approach to getting background php processing,
but no luck.  The page loads without any delay, but no file write.
Any suggestions?

Markup('zapnews', 'inline', '/\(:zapnews:\\)/', Keep('<img
src=http://localhost/zap/pub/sendnews.php border=20>'));

And then in sendnews.php:

<?php
function sendGIF(){
    $img = base64_decode('R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAEALAAAAAABAAEAAAIBTAA7');
    header('Content-Type: image/gif');
    header('Content-Length: '.strlen($img));
    header('Connection: Close');
    print $img;
}

ob_implicit_flush(TRUE);
@ignore_user_abort(true);
sendGIF();
ob_implicit_flush(FALSE);
ob_start();
sleep(5);
$newspage = fopen("http://localhost/zap/news/test.txt", "wb")){
fwrite($newspage,"Hello World");
fclose($newspage);
die();

Cheers,
Caveman



More information about the pmwiki-devel mailing list