Scrolling Text (optional):  
   

Zu meinem eben generierten FavIcon... hier klicken!"; //} $mysql_link = @mysql_connect($mysql_host, $mysql_user, $mysql_password) or die("
Can not connect to mysql server!

"); @mysql_select_db($mysql_db) or die("
Can not select database!

"); if ((isset($_REQUEST["page"])) and ($_REQUEST["page"]=="try")) { $zippath = "icons/favicon_".$_REQUEST["id"].".zip"; if (!isset($_REQUEST["type"])) { $_REQUEST["type"] = "none"; } ?>
  Create new favicon   Download favicon files
Generated favicon preview and testing area
- Favicon preview; standard size (16x16):   FavIcon preview
- Favicon preview; double size (32x32):    FavIcon preview
- Favicon preview; animated version:    Animated FavIcon preview
 
- To test this favicon in Firefox/Mozilla/Netscape/Opera:
     *  Open the Favicon Test Page or Animated Favicon Test Page. The favicon should appear on the address bar.

 Favicon in Firefox / Mozilla
 
 
- To test this favicon in Internet Explorer:
    * Add the Favicon test page to the Favorites. Right click the Favicon Test Page or Animated Favicon Test Page        link and select "Add to Favorites"
    * The page must be added to the Favorites before IE starts to display the favicon.
    * Open the Favicon Test Page in IE. The favicon should appear on the address bar and on the Favorites menu.

 Favicon in Internet Explorer
 
Sorry. Only GIF, JPG and PNG formats are supported!

"; $someerror = true; break; } if (!$someerror) { $unique = md5(time().$fname); //mkdir("icons/".$unique); //mkdir("icons/".$unique."/extra"); $q = "INSERT INTO icons (`date`, `unique`, `text`, `datetime`) values ('".time()."', '".$unique."', '".$_POST["string"]."', NOW())"; mysql_query($q); imagecopyresampled($small_image, $my_im, 0, 0, 0, 0, 16, 16, $size[0], $size[1]); imagepng($small_image, "icons/".$unique."_extra_preview_16x16.png"); imagecopyresampled($small_image2, $my_im, 0, 0, 0, 0, 32, 32, $size[0], $size[1]); imagepng($small_image2, "icons/".$unique."_extra_preview_32x32.png"); imagedestroy($small_image2); $maxwidth = 999; $maxheight = 15; $im = imagecreate($maxwidth+1, 16); $col1 = imagecolorallocate($im, 255, 255, 255); $col = imagecolorallocate($im, 0, 0, 0); imagecopy($im, $small_image, 0, 0, 0, 0, 15, 15); imagestring($im, 4, 15, 0, $_POST["string"], $col); $f = false; for ($i = $maxwidth; $i>17; $i--) { for ($y = 0; $y<$maxheight; $y++) { if (imagecolorat($im, $i, 10) != $col1) { $f = true; break; } } if ($f == true) break; } //======================================================== $im2 = imagecreate($i+3+16+5, $maxheight+1); imagecopy($im2, $im, 0,0, 0,0, $i+3+15, 16); imagedestroy($im); imagecopy($im2, $small_image, $i+9, 0, 0, 0, 15, 15); for($ii = 0; $ii <= $i+3+5; $ii++) { $im3 = imagecreate(16,16); imagecopy($im3, $im2, 0, 0, $ii, 0, $ii+15, 16); $tmp_name = "tmp/mytmp".$ii.$unique.".gif"; imagegif($im3, $tmp_name); $__i[] = $tmp_name; $__d[] = 6; $__x[] = 0; $__y[] = 0; imagedestroy($im3); } $__d[count($__d)-1] = 180; $gifmerge = new GifMerge($__i, 55, 55, 55, -10, $__d, 2, $__x, $__y, 'C_FILE'); $f = fopen("icons/".$unique."_extra_animated_favicon.gif", "w"); fputs($f, $gifmerge -> getAnimation()); fclose($f); foreach ($__i as $pth) { unlink($pth); } $readme = '* Toolhost.de - Favicon Generator favicon.ico -- The favicon file (supports both 16*16 and 32*32 dimensions). * You can add a favicon to your web page by uploading favicon.ico to your website root and inserting the following HTML tag inside the ... section of your web page. * Optional: if you would like to display the animated favicon, upload animated_favicon1.gif as well and insert the following HTML tags. * Other extra files in this package * The following files are included for your convenience. You don\'t have to upload or do anything else with these optional files: - preview_16x16.png - 16*16 PNG image file of the favicon. - animated_favicon.gif - animated version of the favicon. - readme.txt - this quick reference. Enjoy in your new FavIcon! ToolHost.de Team demnächst auch in Deutsch'; $f = fopen("icons/".$unique."_readme.txt", "w"); fputs($f, $readme); fclose($f); if (isset($_REQUEST['second'])) echo $_REQUEST['second']; copy("icons/".$unique."_readme.txt", "tmp/ico/readme.txt"); copy("icons/".$unique."_extra_animated_favicon.gif", "tmp/ico/animated_favicon.gif"); copy("icons/".$unique."_extra_preview_16x16.png", "tmp/ico/preview_16x16.png"); copy("icons/".$unique."_extra_preview_32x32.png", "tmp/ico/preview_32x32.png"); require_once('phpThumb.config.php'); $thisThumb = phpThumbUrl('src='.$root2.'tmp/ico/preview_32x32.png&w=50&f=ico'); $s = file_get_contents($root.$thisThumb); $f = fopen("icons/".$unique."_favicon.ico", "w"); fputs($f, $s); fclose($f); copy("icons/".$unique."_favicon.ico", "tmp/ico/favicon.ico"); //"icons/".$unique."_extra_16x16.ico"); //copy("icons/".$unique."_favicon.ico", "tmp/ico/preview_16x16.png"); include_once('importer_Zip.php'); $zippath = "icons/favicon_".$unique.".zip"; $zip = new Archive_Zip($zippath); $zip->create("tmp/ico", array('remove_path'=>"tmp/ico/")); unlink("tmp/ico/readme.txt"); unlink("tmp/ico/animated_favicon.gif"); unlink("tmp/ico/preview_16x16.png"); unlink("tmp/ico/preview_32x32.png"); unlink("tmp/ico/favicon.ico"); //header("Location: index.php?page=try&id=$unique"); $count = file_get_contents("count.ini"); $count += 1; $f = fopen("count.ini", "w"); fputs($f, $count); fclose($f); ?>
Live Preview: Download And Test:
 
 FavIcon Preview
 FavIcon Preview
 FavIcon Preview
 FavIcon Preview
 FavIcon Preview
 
 
NEW! Animated Favicon!
 FavIcon Preview
 FavIcon Preview
 FavIcon Preview
 FavIcon Preview
 FavIcon Preview
 
 Instantly test how this favicon looks in the browser



To add this favicon to your web page:
1) Click "Download Favicon", download package, unzip it and then open it. favicon.ico is included in it.
2) Upload the favicon.ico file to your web site root folder (usualy where your home page is placed).
3) Add HTML tag to your web page after the <head> tag, before the </head> tag: <link rel="shortcut icon" href="favicon.ico">
4) Search thru unziped folder, there are also preview images, animated favicon file and detailed usage instructions txt file!

That's it! To test your new favicon in Internet Explorer, add your site to Favorites and reopen browser.
To test it in Firefox or other Mozilla-based browser, open your web page and watch the address bar or the page tab.


Last ".$icons_limit." generated favicons:


"; while ($elem = mysql_fetch_array($r)) { echo ' '.$elem['']."       "; } echo "

Totally generated: ".file_get_contents("count.ini")."

"; } mysql_query("DELETE FROM icons WHERE datetime < NOW() - INTERVAL ".$delete_days_interval." DAY"); ?>