<?php
//connect to database
$q = "select blobfield from table where (where clause)";
$r = mysql_query($q);
$data = mysql_result($r, 0);
$fp = fopen("temp_file.php", "w+");
flock($fp, LOCK_EX);
fwrite($fp, $data);
flock($fp, LOCK_UN);
fclose($fp);
include "temp_file.php";
?>