<?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>Jens Olsson &#187; PHP</title>
	<atom:link href="http://jens.yelles.se/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://jens.yelles.se</link>
	<description>My Underground Development</description>
	<lastBuildDate>Tue, 16 Aug 2011 09:27:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Print days from date 1 to date 2</title>
		<link>http://jens.yelles.se/2009/05/28/print-days-from-date-1-to-date-2/</link>
		<comments>http://jens.yelles.se/2009/05/28/print-days-from-date-1-to-date-2/#comments</comments>
		<pubDate>Thu, 28 May 2009 19:53:48 +0000</pubDate>
		<dc:creator>Jens Olsson</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://jens.yelles.se/?p=86</guid>
		<description><![CDATA[This function created by me will show the days and dates between two dates. Enjoy! &#60;form method=&#8221;post&#8221; action=&#8221;date.php&#8221;&#62; Date 1 (ex 20090101 = Y = 2009 M = 01 D = 01):&#60;br /&#62; &#60;input type=&#8221;text&#8221; name=&#8221;date1&#8243; style=&#8221;width:300px;&#8221; /&#62;&#60;br /&#62; Date 2 (ex 20090101 = Y = 2009 M = 01 D = 01):&#60;br /&#62; &#60;input [...]]]></description>
			<content:encoded><![CDATA[<p>This function created by me will show the days and dates between two dates. Enjoy!</p>
<blockquote><p>&lt;form method=&#8221;post&#8221; action=&#8221;date.php&#8221;&gt;<br />
Date 1 (ex 20090101 = Y = 2009 M = 01 D = 01):&lt;br /&gt;<br />
&lt;input type=&#8221;text&#8221; name=&#8221;date1&#8243; style=&#8221;width:300px;&#8221; /&gt;&lt;br /&gt;<br />
Date 2 (ex 20090101 = Y = 2009 M = 01 D = 01):&lt;br /&gt;<br />
&lt;input type=&#8221;text&#8221; name=&#8221;date2&#8243; style=&#8221;width:300px;&#8221; /&gt;&lt;br /&gt;<br />
&lt;input type=&#8221;submit&#8221; /&gt;<br />
&lt;/form&gt;<br />
&lt;?<br />
if(isset($_POST['date1'])) {</p>
<p>$date1 = $_POST['date1'];<br />
$date2 = $_POST['date2'];</p>
<p>$dag = substr($date1, 6, 2);<br />
$manad = substr($date1, 4, 2);<br />
$ar = substr($date1, 0, 4);</p>
<p>while($date1 &lt; $date2) {</p>
<p>$date1 = &#8220;&#8221; . $ar . &#8220;&#8221; . $manad . &#8220;&#8221; . $dag . &#8220;&#8221;;</p>
<p>echo date(&#8216;D&#8217;, strtotime($date1)); echo &#8221; &#8220;;<br />
echo date(&#8216;d&#8217;, strtotime($date1)); echo &#8220;/&#8221;;<br />
echo date(&#8216;m&#8217;, strtotime($date1)); echo &#8221; &#8211; &#8220;;<br />
echo date(&#8216;Y&#8217;, strtotime($date1));</p>
<p>echo &#8220;&lt;br&gt;&#8221;;</p>
<p>$num = cal_days_in_month(CAL_GREGORIAN, $manad, $ar);</p>
<p>$datumdag = &#8220;&#8221; . $manad . &#8220;&#8221; . $dag . &#8220;&#8221;;<br />
if($datumdag==1231) {<br />
$ar++;<br />
$manad=&#8221;01&#8243;;<br />
$dag=&#8221;01&#8243;;<br />
$notchange = 1;<br />
} else {<br />
$notchange = 0;<br />
}</p>
<p>if($notchange==0) {<br />
if($dag==$num) {<br />
$dag = &#8220;01&#8243;;<br />
$manad++;<br />
if($manad&lt;10) {<br />
$manad = &#8220;0&#8243; . $manad . &#8220;&#8221;;<br />
}</p>
<p>} else {<br />
$dag++;<br />
if($dag&lt;10) {<br />
$dag = &#8220;0&#8243; . $dag . &#8220;&#8221;;<br />
}<br />
}<br />
}</p>
<p>}</p>
<p>}<br />
?&gt;</p></blockquote>
<p>For example go to:</p>
<p>http://jens.yelles.se/example/date.php</p>
]]></content:encoded>
			<wfw:commentRss>http://jens.yelles.se/2009/05/28/print-days-from-date-1-to-date-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Send mail via PHP</title>
		<link>http://jens.yelles.se/2009/03/22/send-mail-via-php/</link>
		<comments>http://jens.yelles.se/2009/03/22/send-mail-via-php/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 21:36:37 +0000</pubDate>
		<dc:creator>Jens Olsson</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://jens.yelles.se/?p=76</guid>
		<description><![CDATA[First of all you have to change in your php.ini file if you do not have any mail server installed on your server/computer. You can send through your ISP SMTP server. Change this line in php.ini: SMTP = localhost To any vaild SMTP server, in my case I use my ISP smtp-server: SMTP = smtp.bredband.net [...]]]></description>
			<content:encoded><![CDATA[<p>First of all you have to change in your php.ini file if you do not have any mail server installed on your server/computer. You can send through your ISP SMTP server. Change this line in php.ini:</p>
<blockquote><p>SMTP = localhost</p></blockquote>
<p>To any vaild SMTP server, in my case I use my ISP smtp-server:</p>
<blockquote><p>SMTP = smtp.bredband.net</p></blockquote>
<p>When this is done you can easy send mail via PHP function <a href="http://se2.php.net/manual/en/book.mail.php">mail()</a></p>
<p>Good Luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://jens.yelles.se/2009/03/22/send-mail-via-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache2, PHP 5, MySQL 5, phpMyAdmin for Windows</title>
		<link>http://jens.yelles.se/2009/03/21/apache2-php-5-mysql-5-phpmyadmin-for-windows/</link>
		<comments>http://jens.yelles.se/2009/03/21/apache2-php-5-mysql-5-phpmyadmin-for-windows/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 20:22:52 +0000</pubDate>
		<dc:creator>Jens Olsson</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Apache2]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpMyAdmin]]></category>

		<guid isPermaLink="false">http://jens.yelles.se/?p=74</guid>
		<description><![CDATA[Here comes a little howto install Apache2, PHP 5, MySQL 5 and phpMyAdmin for windows. In this tutorial I will use easyPHP which is a packed for these applications. First, go to www.easyphp.org for downloading easyphp 3. After you have download it just install easyphp. When it is installed run it and go to http://127.0.0.1/home/ [...]]]></description>
			<content:encoded><![CDATA[<p>Here comes a little howto install <strong>Apache2, PHP 5, MySQL 5 </strong>and <strong>phpMyAdmin</strong> for windows.</p>
<p>In this tutorial I will use easyPHP which is a packed for these applications.</p>
<p>First, go to <a href="http://www.easyphp.org">www.easyphp.org</a> for downloading easyphp 3.</p>
<p>After you have download it just install easyphp.</p>
<p>When it is installed run it and go to <a href="http://127.0.0.1/home/">http://127.0.0.1/home/</a></p>
<p>Here is where you can run phpMyAdmin, add links to other folders that is not in www etc. Everything is done here but I can recommend you to update this things:</p>
<p>1. Right click on your trail icon. Config » PHP. Edit short_open_tag = Off to short_open_tag = On.</p>
<p>2. Add new user to your MySQL server. Go to  <a href="http://127.0.0.1/home/">http://127.0.0.1/home/</a> select phpmyadmin (mysql management) and go to privilege.  Here you can add users. Do NOT edit root password, it will cause problems.</p>
<p>If you have problem let me know and I will try to help you out.</p>
<p>Good Luck</p>
]]></content:encoded>
			<wfw:commentRss>http://jens.yelles.se/2009/03/21/apache2-php-5-mysql-5-phpmyadmin-for-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random letters with PHP</title>
		<link>http://jens.yelles.se/2009/03/17/random-letters-with-php/</link>
		<comments>http://jens.yelles.se/2009/03/17/random-letters-with-php/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 20:19:19 +0000</pubDate>
		<dc:creator>Jens Olsson</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://jens.yelles.se/?p=69</guid>
		<description><![CDATA[Since it was no already function for random letters in PHP i was google on it and found this one some where i do not remeber but works exemplary. function randomletters() { $chars = &#8220;abcdefghijkmnopqrstuvwxyz023456789&#8243;; srand((double)microtime()*1000000); $i = 0; $pass = &#8221; ; while ($i &#60;= 7) { $num = rand() % 33; $tmp = [...]]]></description>
			<content:encoded><![CDATA[<p>Since it was no already function for random letters in PHP i was google on it and found this one some where i do not remeber but works exemplary.</p>
<blockquote><p>function randomletters() {<br />
$chars = &#8220;abcdefghijkmnopqrstuvwxyz023456789&#8243;;<br />
srand((double)microtime()*1000000);<br />
$i = 0;<br />
$pass = &#8221; ;<br />
while ($i &lt;= 7) {<br />
$num = rand() % 33;<br />
$tmp = substr($chars, $num, 1);<br />
$pass = $pass . $tmp;<br />
$i++;<br />
}<br />
return $pass;<br />
}</p></blockquote>
<p>If you know who made this one please tell me and i will link to the page in this post <img src='http://jens.yelles.se/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>For random numbers please take a look at <a title="rand();" href="http://se2.php.net/manual/en/function.rand.php">rand</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jens.yelles.se/2009/03/17/random-letters-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Print PHP version</title>
		<link>http://jens.yelles.se/2009/02/08/print-php-version/</link>
		<comments>http://jens.yelles.se/2009/02/08/print-php-version/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 23:49:49 +0000</pubDate>
		<dc:creator>Jens Olsson</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://jens.yelles.se/?p=24</guid>
		<description><![CDATA[Since alot of friends ask me how to print out which PHP version they are using I decide to write how to do it here on my blog. It is very simple and will just take a few seconds. Start with creating a new PHP document, for example: phpinfo.php In the document you simply write: [...]]]></description>
			<content:encoded><![CDATA[<p>Since alot of friends ask me how to print out which PHP version they are using I decide to write how to do it here on my blog. It is very simple and will just take a few seconds.</p>
<p>Start with creating a new PHP document, for example: phpinfo.php</p>
<p>In the document you simply write:</p>
<blockquote><p>&lt;?PHP</p>
<p>phpinfo();</p>
<p>?&gt;</p></blockquote>
<p>And save. Only thing left is to open the page. So, access to your phpinfo.php file and you will be given all the information about your PHP-version.</p>
]]></content:encoded>
			<wfw:commentRss>http://jens.yelles.se/2009/02/08/print-php-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

