}
#phpinfo();
$size = 0;
$imgcode="";
#run this with:
if (array_key_exists("i", $_REQUEST ) && $_REQUEST["i"] == "holtsmarklogo")
{ holtsmarklogo(); die(); }
if (array_key_exists("i", $_REQUEST ) && $_REQUEST["i"]== "base64imglogo")
{ base64imglogo(); die(); }
if ( array_key_exists( "submit", $_POST ))
{
$uploadfile = "";
if (array_key_exists("uploadfile", $_FILES ) ) $uploadfile = $_FILES["uploadfile"]["tmp_name"];
if ( array_key_exists("uploadfile", $_FILES )) $uploadfile_name = $_FILES["uploadfile"]["name"];
if ($_FILES["uploadfile"]["name"] == "none")
die("
Error: Could not fetch uploaded file
Please go back and try again!
base64img v$ver is created by
");
if (!File_exists ("$uploadfile"))
die("
Error: Could not fetch uploaded file, wrong premissions
or pathname is incorrect...
Point variable \$f to a filename!
\$f = $f
\$uploadfile = $uploadfile
\$uploadfile_name = $uploadfile_name
or disable \$f in the file.
base64img v$ver is created by
");
function showphpcode()
{
global $c,$size,$imgcode;
echo "
# Copy and paste this code
# into the TOP of your
# php-script!
";
echo "
function img()
{
header(\"Content-type: image/$c\");
header(\"Content-length: $size\");
echo base64_decode(
'";
echo $imgcode;
echo "');
}
# Above is the code of
# your image..
# Here is a Example:
# This is the phpcode to
# execute function img(); :
if ( array_key_exists(\"image\", \$_REQUEST) && \$_REQUEST[\"image\"]==1) { img(); die(); }
# End PHP ?>
?image=1>
Created with
base64img.php
";
}
if ( $uploadfile != "" )
{
$fd = fopen ($uploadfile, "rb");
$size=filesize ($uploadfile);
$c=substr("$uploadfile_name",strrpos($uploadfile_name,".")+1);
$cont = fread ($fd, $size);
fclose ($fd);
$encimg=base64_encode($cont);
$imgcode=chunk_split("$encimg",$LineLength,"'.
'");
}
if (array_key_exists("do", $_POST) && $_POST["do"] == "send")
{
header( "Content-type: application/x-httpd-php" );
header( "Content-Disposition: attachment; filename=testbase64img.php" );
# header( "Content-Description: PHP3 Generated Data" );
showphpcode();
die();
}
if ( array_key_exists("do", $_POST) && $_POST["do"] == "show")
{
$LineLength+=5;
htmlhead();
echo '';
}
}
else
{
htmlhead();
}
if (!array_key_exists("submit", $_POST )) { ?>
}
else {?>
">Go back
} ?>
base64img v echo $ver ?>
?i=holtsmarklogo" border="0">