user15: Some mining pool admins put custom data in block headers, like prayers. How do they do that? Where can I see that data for myself?

user9: There was a very interesting talk at Chaos Communication Camp this year on this topic. IIRC, you can store arbitrary information in bitcoin transactions, since they actually contain "programs" specifying how the transaction should be verified.
Information on the 'scripting' interface can be found here.  See section 2.3 for details on imbedding messages.

user61: Dan Kaminsky explained his method and motivations for inserting images into the blockchain at a talk at Black Hat USA 2011 - the relevant slides (12 -20) from the presentation can be found here. 
His basic method was to create transactions with lots of outputs and to include the message in ASCII, in pieces, in the receiving address field of the output scripts. You can see the corresponding hex codes for the ASCII in his message in the raw transaction. You can see that the message is interrupted by the other transaction fields, so you can only see the messages properly if you look with a tool (such as strings) that filters out non-printable characters and displays printable characters in lines. His transaction required a .15 bitcoin fee, about $1.50 at the time.

user8: When you generate a block, the generation transaction (the one that creates new coins) has an attribute called coinbase. It's a special value you can put anything you want in to make the block unpredictable to others (and this is good).
So, naturally, you can put text in this attribute, although most just put mining-related information that is not human-readable (nonce and extra-nonce).
You can read this coinbase by using a patched bitcoin node that can dump blocks, for example with the "dumpblock" or "getblockbyhash" patches.
Or you can just print every string in the blockchain database directly :
strings -n 20 blk0001.dat
Example for the 1st block:
Coinbase: 04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73
ASCII-translation:
ᝣᝣᝣᝣᝣᝣᝣEThe Times 03/Jan/2009 Chancellor on brink of second bailout for banks
This is what is used by the Eligius pool ; it puts prayers in this field.

15: <p>Some mining pool admins put custom data in block headers, <a href="https://bitcointalk.org/index.php?topic=38007.0">like prayers</a>. How do they do that? Where can I see that data for myself?</p>
 9: <p>There was <a href="http://dankaminsky.com/2011/08/05/bo2k11/" rel="nofollow">a very interesting talk</a> at Chaos Communication Camp this year on this topic. IIRC, you can store arbitrary information in bitcoin transactions, since they actually contain "programs" specifying how the transaction should be verified.</p>

<p>Information on the 'scripting' interface can be found <a href="https://en.bitcoin.it/wiki/Script" rel="nofollow">here</a>.  See section 2.3 for details on imbedding messages.</p>
 61: <p>Dan Kaminsky explained his method and motivations for inserting images into the blockchain at a talk at Black Hat USA 2011 - the relevant slides (12 -20) from the presentation can be found <a href="http://www.slideshare.net/dakami/black-ops-of-tcpip-2011-black-hat-usa-2011" rel="nofollow">here.</a> </p>

<p>His basic method was to create transactions with lots of outputs and to include the message in ASCII, in pieces, in the receiving address field of the output scripts. You can see the corresponding hex codes for the ASCII in his message in the <a href="http://blockexplorer.com/rawtx/930a2114cdaa86e1fac46d15c74e81c09eee1d4150ff9d48e76cb0697d8e1d72" rel="nofollow">raw transaction</a>. You can see that the message is interrupted by the other transaction fields, so you can only see the messages properly if you look with a tool (such as <a href="http://linux.die.net/man/1/strings" rel="nofollow">strings</a>) that filters out non-printable characters and displays printable characters in lines. His transaction required a .15 bitcoin fee, about $1.50 at the time.</p>
 8: <p>When you generate a block, the generation transaction (the one that creates new coins) has an attribute called <strong>coinbase</strong>. It's a special value you can put anything you want in to make the block unpredictable to others (and this is good).</p>

<p>So, naturally, you can put text in this attribute, although most just put mining-related information that is not human-readable (nonce and extra-nonce).</p>

<p>You can read this coinbase by using a patched bitcoin node that can dump blocks, for example with the "dumpblock" or "getblockbyhash" patches.</p>

<p>Or you can just print every string in the blockchain database directly :
<code>strings -n 20 blk0001.dat</code></p>

<p>Example for the 1st block:</p>

<p>Coinbase: <code>04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73</code></p>

<p>ASCII-translation:
<code>ᝣᝣᝣᝣᝣᝣᝣEThe Times 03/Jan/2009 Chancellor on brink of second bailout for banks</code></p>

<p>This is what is used by the Eligius pool ; it puts prayers in this field.</p>
