Home > Download >
HTTP Keep-Alive Connections in PHP | Sitemap Search |
|
Sections Membership Features
Recent comments
very difficult by alfin Taking the credit for another persons work ? by curious dude. |
HTTP Keep-Alive Connections in PHPPosted by martin on 8 Sep 2002. PHP class for easy use of HTTP keep alive connections. Handles transparently close connections, keep alives with content-length, and chunked encoding. Download
CommentsOptimized 512K level cache (win2K/XP) by MiDiManPCX (vudinhandy@yahoo.com) on 14 Mar 2003 8:59pm GMT Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management] "SecondLevelDataCache"=dword:00000200 how do you use this by zajako on 13 Jul 2003 1:53pm GMT i get errors saying my function arguemnts are invalid. Please provide some directions on how to use this class. Misses error code when not 200 by jb (johnwarde@hotmail.com) on 29 Jul 2003 1:12am GMT the get() method misses the status code when a HTTP code other than 200 is returned. i.e. when a "HTTP/1.1 400 Bad Request" is returned status becomes "Bad" when. I believe it should be 400. Little code to help with this by Bermi Ferrer () on 3 Jun 2004 4:51am GMT Hello, You can make a session not to expire by using this code. Its a mixture of PHP and JavaScript and can be used on the same page were your code goes or invoked by a ilayer/iframe from your page. Here is the code. <? //First of all we prevent browsers from caching the image header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); //This piece of code returns a blank gif if($_GET[img] > 0){ header('Content-Type: image/gif'); header("Content-Disposition: inline; filename=".time().".gif"); echo base64_decode("R0lGODlhAQABAPcAAAAAAAAAQAAAgAAA/wAgAAAgQAAggAAg/wBAAABAQABAgABA/wBgAABgQABggABg/wCAAACAQACAgACA/wCgAACgQACggACg/wDAAADAQADAgADA/wD/AAD/QAD/gAD//yAAACAAQCAAgCAA/yAgACAgQCAggCAg/yBAACBAQCBAgCBA/yBgACBgQCBggCBg/yCAACCAQCCAgCCA/yCgACCgQCCggCCg/yDAACDAQCDAgCDA/yD/ACD/QCD/gCD//0AAAEAAQEAAgEAA/0AgAEAgQEAggEAg/0BAAEBAQEBAgEBA/0BgAEBgQEBggEBg/0CAAECAQECAgECA/0CgAECgQECggECg/0DAAEDAQEDAgEDA/0D/AED/QED/gED//2AAAGAAQGAAgGAA/2AgAGAgQGAggGAg/2BAAGBAQGBAgGBA/2BgAGBgQGBggGBg/2CAAGCAQGCAgGCA/2CgAGCgQGCggGCg/2DAAGDAQGDAgGDA/2D/AGD/QGD/gGD//4AAAIAAQIAAgIAA/4AgAIAgQIAggIAg/4BAAIBAQIBAgIBA/4BgAIBgQIBggIBg/4CAAICAQICAgICA/4CgAICgQICggICg/4DAAIDAQIDAgIDA/4D/AID/QID/gID//6AAAKAAQKAAgKAA/6AgAKAgQKAggKAg/6BAAKBAQKBAgKBA/6BgAKBgQKBggKBg/6CAAKCAQKCAgKCA/6CgAKCgQKCggKCg/6DAAKDAQKDAgKDA/6D/AKD/QKD/gKD//8AAAMAAQMAAgMAA/8AgAMAgQMAggMAg/8BAAMBAQMBAgMBA/8BgAMBgQMBggMBg/8CAAMCAQMCAgMCA/8CgAMCgQMCggMCg/8DAAMDAQMDAgMDA/8D/AMD/QMD/gMD///8AAP8AQP8AgP8A//8gAP8gQP8ggP8g//9AAP9AQP9AgP9A//9gAP9gQP9ggP9g//+AAP+AQP+AgP+A//+gAP+gQP+ggP+g///AAP/AQP/AgP/A////AP//QP//gP///yH5BAEAAP8ALAAAAAABAAEAAAgEAP8FBAA7"); exit; } ?> <!-- HERE YOU CAN INSERT THE HTML OR PHP CODE --> <img name="keepUpdated" src="<?=$_SELF?>?img=999"> <script language="Javascript"> <!-- var updateEvery = 30;//Seconds function keepUpdated() { timer=setTimeout("updateImage()",1000*updateEvery) } function updateImage() { var randNum = Math.floor(Math.random()*999); document.images.keepUpdated.src ="<?=$_SELF?>?img="+randNum; keepUpdated(); } keepUpdated(); //--> </script> |