Just thought some others would like to see this.  Using the information that Christain 
provided ( from http://www.markme.com/cantrell/archives/002736.cfm ) I did some 
playing.

Place the appended code in it's own template (let's say "FauxGIF.cfm").  Then call the 
template in an <img> tag as in <img src="FauxGIF.cfm"> - you'll get a single, pixel 
transparent gif in the browser.

This technique works in any version of CF higher than 4.5.  Also note that the graphic 
itself was previously converted to base64 and that text saved for use here: this 
template is completely self-contained: no source graphic is needed.

You could of course use CFFILE and the toBase64() function to capture the code needed 
for any image (or file for that matter, but then you'd have to change the encoding).

As it stands you'd be able to use this for page tracking or somesuch.  Changing the 
graphic (perhaps storing the encoded text in a DB) and this makes for a nice 
foundation for a advertising or logo tracking system.

Sorry if this is old news... but I'm an old dog.  It delights and amazes me when, 
against all traditional wisdom, I learn a new trick.  ;^)

Here's page:

<cfsilent>
<cfsetting showdebugoutput="No" />

        <!--- Put what ever processing you like here --->

<cfcontent type="image/gif; charset=8859_1">
</cfsilent><cfoutput>#ToString(ToBinary("R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="))#</cfoutput>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to