note 35200 added to function.header

From: Date: Sat, 23 Aug 2003 06:35:57 +0000
Subject: note 35200 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-54934@lists.php.net to get a copy of this message
If you're looking for a logic to code Web bug (http://www.netlingo.com/lookup.cfm?term=Web%20bug) or invisible counter, here it is. See, the usage of Content-type header in this context. <?php //File name: webbug.php //Usage: <IMG src="webbug.php?id=999"> if (isset($_GET['id'])) //if "id" is passed, process it { //set cookies (if necessary) //log the user, browser, and other details //Important: Do not print or echo any messages here } //show 1x1 invisible GIF... header("Content-type: image/gif"); echo chr(0x47).chr(0x49).chr(0x46).chr(0x38).chr(0x39). chr(0x61).chr(0x01).chr(0x00).chr(0x01).chr(0x00). chr(0x80).chr(0x00).chr(0x00).chr(0x04).chr(0x02). chr(0x04).chr(0x00).chr(0x00).chr(0x00).chr(0x21). chr(0xF9).chr(0x04).chr(0x01).chr(0x00).chr(0x00). chr(0x00).chr(0x00).chr(0x2C).chr(0x00).chr(0x00). chr(0x00).chr(0x00).chr(0x01).chr(0x00).chr(0x01). chr(0x00).chr(0x00).chr(0x02).chr(0x02).chr(0x44). chr(0x01).chr(0x00).chr(0x3B); ?> HTH, R. Rajesh Jeba Anbiah ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35200 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35200&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35200&report=yes

« previous php.notes (#54934) next »