<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Form immagine con estensione .ico]]></title><description><![CDATA[<p dir="auto">Ciao, ho uno script che permette la creazione di favicon con estensione .ico solo nella grandezza 16x16px<br />
Come è possibile generarle anche nelle grandezze 32×32, 48×48, 64×64?</p>
<p dir="auto">Questa dovrebbe essere la parte che dovrebbe interessare, credo:</p>
<pre><code>[/FONT][/COLOR]$sessionhandler = new SessionSystem();$sessionhandler-&gt;SessionStart();


		$post_size = ini_get('post_max_size');
	    substr($post_size, -1);
	    
	    $post_size = $post_size * 1024;


	    if (($_SERVER['CONTENT_LENGTH'] / 1024) &gt; $post_size) $error = true;
	    if(isset($error)){
		    Messages::SetMessages('The image is larger the accepted MAX (2Mb)','error');
			header('Location: index.php');
	    }
	    
	    
if(isset($_POST['submit']) &amp;&amp; $_POST['submit'] == 1){


		
		if($_FILES['favicon']['error'] &gt; 0){
			Messages::SetMessages('Has not chosen any image','error');
			header('Location: index.php');
		}else{
	    
		$image_name = $_FILES['favicon']['name'];
		$image_size = $_FILES['favicon']['size'];
		$temp = $_FILES['favicon']['tmp_name'];
	
		if(($image_size /1024) &gt; 2048){
			
			Messages::SetMessages('The image is larger the accepted MAX (2Mb)','error');
			header('Location: index.php');
			
		}
		$image = new Thumbnail();
		$image-&gt;Image($temp);
		$i_name = $image-&gt;getImagename();
		$parts = explode(".",$i_name);
		
		
		$dir = 'uploads';
		
		$final_image_name = $image-&gt;SetImageName(time().'.ico');
		
		$image-&gt;SetImageDir($dir.DIRECTORY_SEPARATOR.$final_image_name);
				
		$saved = $image-&gt;SaveImage(16, 16 ,$image-&gt;GetImageDir());
		
		$sessionhandler-&gt;SetSessionVar('favicon',$image-&gt;getImageName());
		
		Messages::SetMessages('Has been generated correctly favicon!','success');
		header('Location: index.php');
		}


	

}[COLOR=#444444][FONT=Helvetica Neue]
</code></pre>
<p dir="auto">Grazie per il vostro sicuro aiuto,<br />
Marco</p>
]]></description><link>https://dev.connect.gt/topic/208412/form-immagine-con-estensione-ico</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 09:12:29 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/208412.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 25 Nov 2014 20:48:33 GMT</pubDate><ttl>60</ttl></channel></rss>