<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Last Instinct &#187; PHP</title>
	<atom:link href="http://last.instinct.se/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://last.instinct.se</link>
	<description>Web, design and coolness</description>
	<lastBuildDate>Tue, 22 Mar 2011 19:29:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Mailing function for PHP with UTF-8, HTML and attachments</title>
		<link>http://last.instinct.se/check-this-out/mailing-function-for-php-with-utf-8-html-and-attachments/751</link>
		<comments>http://last.instinct.se/check-this-out/mailing-function-for-php-with-utf-8-html-and-attachments/751#comments</comments>
		<pubDate>Sun, 13 Jun 2010 20:51:07 +0000</pubDate>
		<dc:creator>Klas Lundberg</dc:creator>
				<category><![CDATA[Check this out]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[UTF-8]]></category>

		<guid isPermaLink="false">http://last.instinct.se/?p=751</guid>
		<description><![CDATA[I found a function a couple a years ago which I&#8217;ve been using for mailing in my projects. The function was rather basic from the start and then I&#8217;ve added functionality as needed. Nowadays it is changed into only having UTF8 support (since I almost always use UTF8 encoding) and also support for HTML. the [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://theinvisibleagent.wordpress.com/2009/05/24/mailmen-and-women-of-the-past/" target="_blank" title="Mailman"><img src="http://last.instinct.se/wp-content/uploads/mailmanbest002.jpg" alt="" title="Mailman" width="338" height="348" class="alignleft size-full wp-image-756" /></a>I found a function a couple a years ago which I&#8217;ve been using for mailing in my projects. The function was rather basic from the start and then I&#8217;ve added functionality as needed. Nowadays it is changed into only having UTF8 support (since I almost always use UTF8 encoding) and also support for HTML. the HTML encoding is detected automatically if the <code>&lt;html&gt;</code> tag is present in the text. You can attach images and files by adding them into an array. Feel free to use it however you like.</p>
<p>To get UTF-8 to work correctly in your PHP pages, see my post about <a href="http://last.instinct.se/check-this-out/setting-up-php-for-utf8-and-xhtml-compatibility/737">Setting up PHP for UTF8 and XHTML compatibility</a>.</p>
<p>The nice mailman image is from <a href="http://theinvisibleagent.wordpress.com/2009/05/24/mailmen-and-women-of-the-past/" target="_blank">The Invisible Agent</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">////////////////////////////////////////////</span>
<span style="color: #666666; font-style: italic;">// Function: send_mail()</span>
<span style="color: #666666; font-style: italic;">// UTF-8 Mail sending with html and attachments</span>
<span style="color: #666666; font-style: italic;">////////////////////////////////////////////</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/** Sends a mail.
 * 
 * @code {
	# To Email Address
	$to_address = &quot;to@address.com&quot;;
&nbsp;
	# From Email Address
	$from_address = &quot;from@address.com&quot;;
&nbsp;
	# From Name
	$from_name = &quot;Send Mail&quot;;
&nbsp;
	# Message Subject
	$email_subject = &quot;This is a test mail with some attachments&quot;;
&nbsp;
	# Use relative paths to the attachments
	$attachments = Array(
	  Array(&quot;file&quot;=&gt;&quot;../../test.doc&quot;, &quot;content_type&quot;=&gt;&quot;application/msword&quot;), 
	  Array(&quot;file&quot;=&gt;&quot;../../123.pdf&quot;, &quot;content_type&quot;=&gt;&quot;application/pdf&quot;)
	);
&nbsp;
	# Message Body
	$email_body = &quot;&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;This is a message with &lt;b&gt;&quot;.count($attachments).&quot;&lt;/b&gt; attachments and maybe some &lt;i&gt;HTML&lt;/i&gt;!&lt;/body&gt;&lt;/html&gt;&quot;;
&nbsp;
	send_mail($to_address, $from_address, $from_name, $email_subject, $email_body, $attachments);
 } 
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> send_mail<span style="color: #009900;">&#40;</span><span style="color: #000088;">$to_address</span><span style="color: #339933;">,</span> <span style="color: #000088;">$from_address</span><span style="color: #339933;">,</span> <span style="color: #000088;">$from_name</span><span style="color: #339933;">,</span> <span style="color: #000088;">$email_subject</span><span style="color: #339933;">,</span> <span style="color: #000088;">$email_body</span><span style="color: #339933;">,</span> <span style="color: #000088;">$attachments</span><span style="color: #339933;">=</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$eol</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$mime_boundary</span> <span style="color: #339933;">=</span> <span style="color: #990000;">md5</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$headers</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$msg</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$html</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">mb_strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$email_body</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&lt;html&gt;&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000088;">$mail_site</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;send_mail@&quot;</span> <span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SERVER_NAME'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;"># Common Headers
</span>  <span style="color: #000088;">$headers</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'Sender: '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$mail_site</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$headers</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'From: '</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mb_encode_mimeheader</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$from_name</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; &lt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$mail_site</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$headers</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'Reply-To: '</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mb_encode_mimeheader</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$from_name</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; &lt;<span style="color: #006699; font-weight: bold;">$from_address</span>&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$headers</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'Return-Path: '</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mb_encode_mimeheader</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$from_name</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; &lt;<span style="color: #006699; font-weight: bold;">$from_address</span>&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;">// these two to set reply address</span>
  <span style="color: #000088;">$headers</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Message-ID: &lt;&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #000088;">$mime_boundary</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;@&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SERVER_NAME'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$headers</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;X-Mailer: PHP v&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">phpversion</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>          <span style="color: #666666; font-style: italic;">// These two to help avoid spam-filters</span>
&nbsp;
  <span style="color: #666666; font-style: italic;"># Boundry for marking the split &amp; Multitype Headers
</span>  <span style="color: #000088;">$headers</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'MIME-Version: 1.0'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$attachments</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$headers</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Type: multipart/mixed; boundary=<span style="color: #000099; font-weight: bold;">\&quot;</span>1<span style="color: #006699; font-weight: bold;">$mime_boundary</span><span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;--1&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$mime_boundary</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$html</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Type: multipart/alternative; boundary=<span style="color: #000099; font-weight: bold;">\&quot;</span>2<span style="color: #006699; font-weight: bold;">$mime_boundary</span><span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$eol</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>	<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$html</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$headers</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Type: multipart/alternative; boundary=<span style="color: #000099; font-weight: bold;">\&quot;</span>2<span style="color: #006699; font-weight: bold;">$mime_boundary</span><span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;"># Setup for text OR html
</span>  
  <span style="color: #666666; font-style: italic;"># Text Version
</span>  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$html</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;--2&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$mime_boundary</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Type: text/plain; charset=UTF-8&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Transfer-Encoding: 8bit&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$headers</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Type: text/plain; charset=UTF-8&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$headers</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Transfer-Encoding: 8bit&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #990000;">strip_tags</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;br&gt;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$eol</span><span style="color: #339933;">,</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;br /&gt;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$eol</span><span style="color: #339933;">,</span> <span style="color: #000088;">$email_body</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$html</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	  <span style="color: #666666; font-style: italic;"># HTML Version
</span>	  <span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;--2&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$mime_boundary</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
	  <span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Type: text/html; charset=UTF-8&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
	  <span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Transfer-Encoding: 8bit&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
	  <span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$email_body</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
&nbsp;
	  <span style="color: #666666; font-style: italic;"># Finished
</span>	  <span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;--2&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$mime_boundary</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;--&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// finish with two eol's for better security. see Injection.</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$attachments</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
   <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attachments</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	 <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attachments</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;file&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
	   <span style="color: #666666; font-style: italic;"># File for Attachment
</span>	   <span style="color: #000088;">$file_name</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attachments</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;file&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strrpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attachments</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;file&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	   <span style="color: #000088;">$handle</span><span style="color: #339933;">=</span><span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attachments</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;file&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'rb'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	   <span style="color: #000088;">$f_contents</span><span style="color: #339933;">=</span><span style="color: #990000;">fread</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #339933;">,</span> <span style="color: #990000;">filesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attachments</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;file&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	   <span style="color: #000088;">$f_contents</span><span style="color: #339933;">=</span><span style="color: #990000;">chunk_split</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">base64_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$f_contents</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;">//Encode The Data For Transition using base64_encode();</span>
	   <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	   <span style="color: #666666; font-style: italic;"># Attachment
</span>	   <span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;--1&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$mime_boundary</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
	   <span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Type: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$attachments</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;content_type&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;; name=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$file_name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
	   <span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Transfer-Encoding: base64&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
	   <span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Disposition: attachment; filename=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$file_name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// !! This line needs TWO end of lines !! IMPORTANT !!</span>
	   <span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$f_contents</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>
&nbsp;
	 <span style="color: #009900;">&#125;</span>
   <span style="color: #009900;">&#125;</span>
   <span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;--1&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$mime_boundary</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;--&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">.</span><span style="color: #000088;">$eol</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// finish with two eol's for better security. see Injection.</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;"># SEND THE EMAIL
</span>  <span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sendmail_from'</span><span style="color: #339933;">,</span><span style="color: #000088;">$from_address</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// the INI lines are to force the From Address to be used !</span>
  <span style="color: #990000;">mail</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$to_address</span><span style="color: #339933;">,</span> <span style="color: #990000;">mb_encode_mimeheader</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$email_subject</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$msg</span><span style="color: #339933;">,</span> <span style="color: #000088;">$headers</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #990000;">ini_restore</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sendmail_from'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<div class="topsy_widget_data topsy_theme_hot-pink" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Flast.instinct.se%252Fcheck-this-out%252Fmailing-function-for-php-with-utf-8-html-and-attachments%252F751%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fis.gd%2FcO1fq%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Mailing%20function%20for%20PHP%20with%20UTF-8%2C%20HTML%20and%20attachments%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Flast.instinct.se%2Fcheck-this-out%2Fmailing-function-for-php-with-utf-8-html-and-attachments%2F751", "shorturl": "http://is.gd/cO1fq", "style": "small", "title": "Mailing function for PHP with UTF-8, HTML and attachments" });</script></div>

<div align="right" style="float: right; padding: 0px 0px 1px 5px;"><a name="fb_share" type="button_count" share_url="http://last.instinct.se/check-this-out/mailing-function-for-php-with-utf-8-html-and-attachments/751"></a></div>]]></content:encoded>
			<wfw:commentRss>http://last.instinct.se/check-this-out/mailing-function-for-php-with-utf-8-html-and-attachments/751/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up PHP for UTF8 and XHTML compatibility</title>
		<link>http://last.instinct.se/check-this-out/setting-up-php-for-utf8-and-xhtml-compatibility/737</link>
		<comments>http://last.instinct.se/check-this-out/setting-up-php-for-utf8-and-xhtml-compatibility/737#comments</comments>
		<pubDate>Sun, 13 Jun 2010 20:00:21 +0000</pubDate>
		<dc:creator>Klas Lundberg</dc:creator>
				<category><![CDATA[Check this out]]></category>
		<category><![CDATA[Multilanguage]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[UTF-8]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://last.instinct.se/?p=737</guid>
		<description><![CDATA[PHP is usually not configured for working well with UTF8 multilingual support and XHTML from start. To get it working correctly, you need to adjust a few settings. UTF-8 There are two things to think about. First, make sure your php files are saved using UTF8 encoding. Even notepad can achieve this in the file [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://last.instinct.se/wp-content/uploads/languages.png" alt="" title="Language" width="200" height="200" class="alignleft size-full wp-image-747" />PHP is usually not configured for working well with UTF8 multilingual support and XHTML from start. To get it working correctly, you need to adjust a few settings. </p>
<h3>UTF-8</h3>
<p>There are two things to think about. <b>First, make sure your php files are saved using UTF8 encoding</b>. Even notepad can achieve this in the file save dialog. Then you have to set the php.ini settings to UTF8. This can be done with the <a href="http://php.net/manual/en/function.ini-set.php" target="_blank">ini_set()</a> function. The <em>ini_set()</em> have to be called before outputting any text or HTML/XHTML in the document.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// UTF8 settings</span>
<span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mbstring.language'</span><span style="color: #339933;">,</span> 			<span style="color: #0000ff;">'Neutral'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mbstring.internal_encoding'</span><span style="color: #339933;">,</span> 		<span style="color: #0000ff;">'UTF-8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mbstring.http_input'</span><span style="color: #339933;">,</span> 			<span style="color: #0000ff;">'UTF-8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mbstring.http_output'</span><span style="color: #339933;">,</span> 		<span style="color: #0000ff;">'UTF-8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mbstring.encoding_translation'</span><span style="color: #339933;">,</span>	<span style="color: #0000ff;">'On'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mbstring.detect_order'</span><span style="color: #339933;">,</span> 		<span style="color: #0000ff;">'auto'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mbstring.substitute_character'</span><span style="color: #339933;">,</span> 	<span style="color: #0000ff;">'long'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Normally, the server sets the content type correctly if the file is coded in UTF8, but sometimes you need to force the content-type to have UTF8 charset. The <a href="http://php.net/manual/en/function.header.php" target="_blank">header()</a> function also have to be called before outputting any text or HTML/XHTML in the document.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Set XHTML content type and character encoding of the document</span>
<span style="color: #666666; font-style: italic;">// You may also use text/html as mime type instead of application/xhtml+xml</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-Type: application/xhtml+xml; charset=utf-8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Sometimes you may have problems with getting data from MySQL encoded correctly as UTF8. Most of the time this isn&#8217;t a problem, but you can also force some UTF8 settings on the MySQL server. Use the <a href="http://php.net/manual/en/function.mysql-set-charset.php" target="_blank">mysql_set_charset</a> if you have PHP version 5.2 or higher and <em>SET NAMES</em>/<em>SET CHARACTER SET</em> if you have an older version of PHP.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$conn</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'localhost'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'user'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'password'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// PHP 5.2 and above</span>
<span style="color: #990000;">mysql_set_charset</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'utf8'</span><span style="color: #339933;">,</span><span style="color: #000088;">$conn</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">// PHP below v 5.2</span>
<span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SET NAMES utf8&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SET CHARACTER SET utf8&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>At last, do not forget to add the Content-Type &lt;meta&gt; tag in the &lt;head&gt; section of your HTML/XHTML. Otherwise the web browsers will display your page incorrectly anyway.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<h3>XHTML</h3>
<p>To get correct XHTML compatibility you need to adjust the session settings of PHP so that sessions is integrated the right way into your code. The server is often configured to insert session id:s into url:s on your PHP page.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// XHTML compatibility</span>
<span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'arg_separator.output'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&amp;amp;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url_rewriter.tags'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'a=href,area=href,frame=src,input=src,form=action,fieldset='</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>For security reasons, I recommend you to disable the url rewriting, since it makes it possible to hijack another user&#8217;s session under certain circumstances. This makes the previous XHTML settings unnecessary, but keep them if you intend to use sessions by URL.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Disable session by URL</span>
<span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'session.use_only_cookies'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>Still having problems?</h3>
<p>To see your PHP version and how the settings are affected, simply call <code>php_info()</code> after changing the settings. <em>Master value</em> is the original server setting and <em>Local value</em> is the value after changing it using <code>ini_set()</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">php_info<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>These UTF8 settings works most of the time, but many servers may have other configuration issues. If you still have issues with UTF8 check the php_info() output for any settings set to <code>ISO-8859-1</code> and change them to <code>UTF-8</code> using the <code>ini_set()</code> function. If you still have problems, check that your document files really are saved using correct UTF-8 character encoding.</p>
<div class="topsy_widget_data topsy_theme_hot-pink" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Flast.instinct.se%252Fcheck-this-out%252Fsetting-up-php-for-utf8-and-xhtml-compatibility%252F737%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fis.gd%2FcNYBX%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Setting%20up%20PHP%20for%20UTF8%20and%20XHTML%20compatibility%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Flast.instinct.se%2Fcheck-this-out%2Fsetting-up-php-for-utf8-and-xhtml-compatibility%2F737", "shorturl": "http://is.gd/cNYBX", "style": "small", "title": "Setting up PHP for UTF8 and XHTML compatibility" });</script></div>

<div align="right" style="float: right; padding: 0px 0px 1px 5px;"><a name="fb_share" type="button_count" share_url="http://last.instinct.se/check-this-out/setting-up-php-for-utf8-and-xhtml-compatibility/737"></a></div>]]></content:encoded>
			<wfw:commentRss>http://last.instinct.se/check-this-out/setting-up-php-for-utf8-and-xhtml-compatibility/737/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP 5.3.1 update problems</title>
		<link>http://last.instinct.se/cms/php-5-3-1-update-problems/150</link>
		<comments>http://last.instinct.se/cms/php-5-3-1-update-problems/150#comments</comments>
		<pubDate>Tue, 26 Jan 2010 02:48:26 +0000</pubDate>
		<dc:creator>Klas Lundberg</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Fashion]]></category>
		<category><![CDATA[One.com]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Shout]]></category>

		<guid isPermaLink="false">http://last.instinct.se/?p=150</guid>
		<description><![CDATA[One.com just upgraded their systems to PHP version 5.3.1 from 5.2.1. I think it&#8217;s great that they keep their systems updated, but it would be really nice if the could inform about these updates somewhere. On the other hand, their chat support was proved to be excellent once again, giving me the answers I needed [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://www.one.com/" target="_blank">One.com</a> just upgraded their systems to <a href="http://www.php.net/releases/5_3_1.php" target="_blank">PHP version 5.3.1</a> from 5.2.1. I think it&#8217;s great that they keep their systems updated, but it would be really nice if the could inform about these updates somewhere. On the other hand, their chat support was proved to be excellent once again, giving me the answers I needed in a couple of minutes or so.</p>
<p>The problem with the update was however with the new introduction of a very old syntax, used in <a href="http://basicprogramming.blogspot.com/2004/11/introduction.html" target="_blank">Basic</a> (and Visual Basic) back in the days when <a href="http://www.youtube.com/watch?v=U4khlOCzMZA" rel="shadowbox[sbpost-150];player=swf;width=640;height=385;" target="_blank">MC Hammer</a> ruled the charts and <a href="http://en.wikipedia.org/wiki/Ajax">AJAX</a> was a household cleaner liquid or possibly a soccer team. The syntax is the <a href="http://php.net/manual/en/control-structures.goto.php" target="_blank">goto</a> command, used like this:</p>
<p><strong>I would not recommend to use this syntax at all, since it mostly only makes things complicated!</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
goto a<span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Foo'</span><span style="color: #339933;">;</span>
&nbsp;
a<span style="color: #339933;">:</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Bar'</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><em>The above example will output:</em> <code>Bar</code></p>
<p>However, this little command caused a lot of trouble on <a href="http://linnn.co.uk/" target="_blank">Linn&#8217;s site</a>, where all the scripts included a function called <em>goto()</em>. The timing for all this misshappening was really bad, since <a href="http://linnnydren.com/" target="_blank">Linn have a big fashion show coming up</a> and I was in London at the time the site went down. The function is used for redirecting the user to other URL:s with some nice informative graphics in between. With the new command introduced, the function now caused a fatal error on every page, meaning the whole site was down. The problem was easily solved, but I really cannot understand why they would want to introduce that command?</p>
<p><a href="http://php.net/" target="_blank">PHP.net</a> has put together a guide with more info about <a href="http://php.net/migration53" target="_blank">migrating from PHP 5.2.x to PHP 5.3.x</a>.</p>
<div class="topsy_widget_data topsy_theme_hot-pink" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Flast.instinct.se%252Fcms%252Fphp-5-3-1-update-problems%252F150%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22PHP%205.3.1%20update%20problems%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Flast.instinct.se%2Fcms%2Fphp-5-3-1-update-problems%2F150", "style": "small", "title": "PHP 5.3.1 update problems" });</script></div>

<div align="right" style="float: right; padding: 0px 0px 1px 5px;"><a name="fb_share" type="button_count" share_url="http://last.instinct.se/cms/php-5-3-1-update-problems/150"></a></div>]]></content:encoded>
			<wfw:commentRss>http://last.instinct.se/cms/php-5-3-1-update-problems/150/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linnn clothing</title>
		<link>http://last.instinct.se/cms/linnn-clothing/52</link>
		<comments>http://last.instinct.se/cms/linnn-clothing/52#comments</comments>
		<pubDate>Thu, 14 Jan 2010 13:56:38 +0000</pubDate>
		<dc:creator>Klas Lundberg</dc:creator>
				<category><![CDATA[Check this out]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Fashion]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Shout]]></category>

		<guid isPermaLink="false">http://last.instinct.se/?p=52</guid>
		<description><![CDATA[I just put up a website for my friend Linn Nydren and her label Linnn Clothing. She is into designing clothes and have a gorgeous new collection for spring 2010. She is originally from sweden but lives in London and have her business there too. You should check it out if yo&#8217;re into fashion, design [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://linnn.co.uk/" target="_blank" title="1_greydresssidecloseup"><img src="http://last.instinct.se/wp-content/uploads/1_greydresssidecloseup.jpg" alt="Linnn Clothing" title="1_greydresssidecloseup" width="257" height="400" class="alignleft size-full wp-image-54" /></a> I just put up a website for my friend <a href="http://linnnydren.com/" target="_blank">Linn Nydren</a> and her label <a href="http://linnn.co.uk/" target="_blank">Linnn Clothing</a>. She is into designing clothes and have a gorgeous new collection for spring 2010. She is originally from sweden but lives in London and have her business there too. You should check it out if yo&#8217;re into fashion, design and clothes. You can also follow her work on <a href="http://www.facebook.com/pages/l-i-n-n-n-clothing/160858772741" target="_blank">Linnn Clothing on facebook</a>.</p>
<p>The site is made in flash with my own old CMS shout in the backend, still going strong. I also connected <a href="http://www.google.com/analytics/" target="_blank">Google Analytics</a> to it, which I by the way love! =)</p>
<p><a href="http://linnn.co.uk/" target="_blank">&rsaquo; http://linnn.co.uk/</a></p>
<div class="topsy_widget_data topsy_theme_hot-pink" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Flast.instinct.se%252Fcms%252Flinnn-clothing%252F52%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Linnn%20clothing%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Flast.instinct.se%2Fcms%2Flinnn-clothing%2F52", "style": "small", "title": "Linnn clothing" });</script></div>

<div align="right" style="float: right; padding: 0px 0px 1px 5px;"><a name="fb_share" type="button_count" share_url="http://last.instinct.se/cms/linnn-clothing/52"></a></div>]]></content:encoded>
			<wfw:commentRss>http://last.instinct.se/cms/linnn-clothing/52/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Putting up my old CMS</title>
		<link>http://last.instinct.se/cms/putting-up-my-old-cms/6</link>
		<comments>http://last.instinct.se/cms/putting-up-my-old-cms/6#comments</comments>
		<pubDate>Tue, 03 Feb 2009 23:06:27 +0000</pubDate>
		<dc:creator>Klas Lundberg</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[One.com]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Shout]]></category>

		<guid isPermaLink="false">http://last.instinct.se/?p=6</guid>
		<description><![CDATA[This will be the beginning of a hopefully long journey and I'm gonna start it by putting up my old Content Management System. It's a rather flexible system built on PHP and MySQL. I used to make a little money on it until I got my web developer job at Basilicon. Now I'm gonna put it up on the web for free just for fun, so enjoy! ]]></description>
			<content:encoded><![CDATA[
<p>This will be the beginning of a hopefully long journey and I&#8217;m gonna start it by putting up my old Content Management System. It&#8217;s a rather flexible system built on PHP and MySQL. I used to make a little money on it until I got my web developer job at <a href="http://www.basilicon.se/" target="_blank">Basilicon</a>. Now I&#8217;m gonna put it up on the web for free just for fun, so enjoy! </p>
<p>The first thing I will have to do is rename it. It was called Shout, but I discovered that there was another CMS called Shout, so I have to think of another name. Any suggestions? I think I have to do some fine tuning to get it to work properly on my hosting at one.com, but then it should probably work anywhere.</p>
<p>It is actually powering these two sites, check them out.</p>
<p><a href="http://www.memarkitekter.se/" target="_blank">&rsaquo; MEM Arkitekter</a><br />
<a href="http://www.olofmolander.com/" target="_blank">&rsaquo; Olof Molander</a></p>
<div class="topsy_widget_data topsy_theme_hot-pink" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Flast.instinct.se%252Fcms%252Fputting-up-my-old-cms%252F6%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Putting%20up%20my%20old%20CMS%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Flast.instinct.se%2Fcms%2Fputting-up-my-old-cms%2F6", "style": "small", "title": "Putting up my old CMS" });</script></div>

<div align="right" style="float: right; padding: 0px 0px 1px 5px;"><a name="fb_share" type="button_count" share_url="http://last.instinct.se/cms/putting-up-my-old-cms/6"></a></div>]]></content:encoded>
			<wfw:commentRss>http://last.instinct.se/cms/putting-up-my-old-cms/6/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

