<?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>Agrafix Webdesign Blog &#187; PHP</title>
	<atom:link href="http://blog.agrafix.net/category/programmieren/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.agrafix.net</link>
	<description>Programmieren, Technik und Internet</description>
	<lastBuildDate>Tue, 17 Aug 2010 13:45:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>DSLan v1.4</title>
		<link>http://blog.agrafix.net/2010/08/dslan-v1-4/</link>
		<comments>http://blog.agrafix.net/2010/08/dslan-v1-4/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 20:57:23 +0000</pubDate>
		<dc:creator>agrafix</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Projekte]]></category>
		<category><![CDATA[1.4]]></category>
		<category><![CDATA[dslan]]></category>
		<category><![CDATA[staemme]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">http://blog.agrafix.net/?p=367</guid>
		<description><![CDATA[
			
				
			
		
Liebe Leser,
gerade eben haben wir die DSLan v1.4 veröffentlicht. Die DSLan ermöglicht es einen Local-Area-Netzwerk Server mit maximal 10 Spielern des Spiels Die-Stämme zu erstellen.
Download und weitere Info&#8217;s: http://dslan.gfx-dose.de
Liebe Grüße,
Agrafix


Ähnliche Beiträge:Jubiläum



<strong>Ähnliche Beiträge:</strong><ol><li><a href='http://blog.agrafix.net/2009/08/jubilaum/' rel='bookmark' title='Permanent Link: Jubiläum'>Jubiläum</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.agrafix.net%2F2010%2F08%2Fdslan-v1-4%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.agrafix.net%2F2010%2F08%2Fdslan-v1-4%2F&amp;source=agrafixblog&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Liebe Leser,</p>
<p>gerade eben haben wir die<a href="http://dslan.gfx-dose.net" target="_blank" title="Die Stämme Lan"> DSLan </a>v1.4 veröffentlicht. Die<a href="http://dslan.gfx-dose.net" target="_blank" title="Die Stämme Lan"> DSLan </a>ermöglicht es einen Local-Area-Netzwerk Server mit maximal 10 Spielern des Spiels Die-Stämme zu erstellen.</p>
<p>Download und weitere Info&#8217;s: <a href="http://dslan.gfx-dose.de">http://dslan.gfx-dose.de</a></p>
<p>Liebe Grüße,<br />
Agrafix</p>
<!-- PHP 5.x --><img src="http://blog.agrafix.net/?ak_action=api_record_view&id=367&type=feed" alt="" />

<p><strong>Ähnliche Beiträge:</strong><ol><li><a href='http://blog.agrafix.net/2009/08/jubilaum/' rel='bookmark' title='Permanent Link: Jubiläum'>Jubiläum</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.agrafix.net/2010/08/dslan-v1-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zwei einfache Algorithmen: kgV und ggT</title>
		<link>http://blog.agrafix.net/2009/12/zwei-einfache-algorithmen-kgv-und-ggt/</link>
		<comments>http://blog.agrafix.net/2009/12/zwei-einfache-algorithmen-kgv-und-ggt/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 21:55:47 +0000</pubDate>
		<dc:creator>agrafix</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[mathe]]></category>

		<guid isPermaLink="false">http://blog.agrafix.net/?p=199</guid>
		<description><![CDATA[
			
				
			
		
Heute präsentiere ich endlich mal wieder einen Beitrag der sich in die Richtung Mathe/Informatik bewegt. Eigentlich nichts weltbewegendes, nur zwei einfache Algorithmen, die einem beispielsweise beim Bruchrechnen das Leben einfacher machen können: Das kleinste gemeinsame Vielfache und der größte gemeinsame Teiler.

&#60;?php
/**
 * größer gemeinsamer Teiler nach Euclid
 *
 * @param int $a
 * @param int [...]


<em>Keine ähnlichen Beiträge vorhanden</em>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.agrafix.net%2F2009%2F12%2Fzwei-einfache-algorithmen-kgv-und-ggt%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.agrafix.net%2F2009%2F12%2Fzwei-einfache-algorithmen-kgv-und-ggt%2F&amp;source=agrafixblog&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Heute präsentiere ich endlich mal wieder einen Beitrag der sich in die Richtung Mathe/Informatik bewegt. Eigentlich nichts weltbewegendes, nur zwei einfache Algorithmen, die einem beispielsweise beim Bruchrechnen das Leben einfacher machen können: Das kleinste gemeinsame Vielfache und der größte gemeinsame Teiler.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009933; font-style: italic;">/**
 * größer gemeinsamer Teiler nach Euclid
 *
 * @param int $a
 * @param int $b
 * @return int
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> ggT<span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">,</span> <span style="color: #000088;">$b</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: #000088;">$b</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$a</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> ggT<span style="color: #009900;">&#40;</span><span style="color: #000088;">$b</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">%</span><span style="color: #000088;">$b</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * kleinstes gemeinsames Vielfaches
 *
 * @param int $a
 * @param int $b
 * @return int
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> kgV<span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">,</span> <span style="color: #000088;">$b</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">*</span><span style="color: #000088;">$b</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span>ggT<span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">,</span> <span style="color: #000088;">$b</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Beispiel</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type:text/plain&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;ggT(114, 24) = &quot;</span><span style="color: #339933;">.</span>ggT<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">114</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">24</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;kgV(45, 35) = &quot;</span><span style="color: #339933;">.</span>kgV<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">45</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">35</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Die Ausgabe sollte wie folgt aussehen:</p>
<pre>ggT(114, 24) = 6
kgV(45, 35) = 315</pre>
<p>Wer den ggT bzw den kgV von mehreren Zahlen braucht, kann sich an folgende Regel halten:</p>
<pre>kgV(a, b, c, d) = kgV(kgV(a, b), kgV(c, d))</pre>
<!-- PHP 5.x --><img src="http://blog.agrafix.net/?ak_action=api_record_view&id=199&type=feed" alt="" />

<p><em>Keine ähnlichen Beiträge vorhanden</em></p>]]></content:encoded>
			<wfw:commentRss>http://blog.agrafix.net/2009/12/zwei-einfache-algorithmen-kgv-und-ggt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP und register_globals</title>
		<link>http://blog.agrafix.net/2009/08/php-und-register_globals/</link>
		<comments>http://blog.agrafix.net/2009/08/php-und-register_globals/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 17:06:15 +0000</pubDate>
		<dc:creator>agrafix</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[register_globals]]></category>

		<guid isPermaLink="false">http://blog.agrafix.net/?p=44</guid>
		<description><![CDATA[
			
				
			
		
Ich versteh&#8217; es einfach nicht. Warum gibt es immer noch Webhoster die die php.ini-Setting register_globals aktiviert haben? Ich war gestern abend mindestens eine halbe Stunde auf Bug-Suche, bis ich bemerkt hatte das unser liebes register_globals Variablen definiert hatte &#8211; die eigentlich leer bleiben hätte sollen. Ja, man darf mir jetzt unsauberes Coden vorwerfen &#8211; ich [...]


<em>Keine ähnlichen Beiträge vorhanden</em>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.agrafix.net%2F2009%2F08%2Fphp-und-register_globals%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.agrafix.net%2F2009%2F08%2Fphp-und-register_globals%2F&amp;source=agrafixblog&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Ich versteh&#8217; es einfach nicht. Warum gibt es immer noch Webhoster die die php.ini-Setting register_globals aktiviert haben? Ich war gestern abend mindestens eine halbe Stunde auf Bug-Suche, bis ich bemerkt hatte das unser liebes register_globals Variablen definiert hatte &#8211; die eigentlich leer bleiben hätte sollen. Ja, man darf mir jetzt unsauberes Coden vorwerfen &#8211; ich hätte jeder Variable vor der Verwendung ja einen Initialwert geben können. Allerdings kommt PHP doch eigentlich auch gut ohne aus &#8211; und wenn man mal was quick&#8217;n'dirty machen will scheitert PHP an seinen eigenen Einstellungen&#8230;</p>
<p>register_globals wird endlich mit PHP6 abgeschafft &#8211; seit PHP5.3 gillt es als &#8220;veraltet&#8221;. Und warum gibt&#8217;s dann immer noch Webhoster die sowas standardmäßig aktivieren?!</p>
<!-- PHP 5.x --><img src="http://blog.agrafix.net/?ak_action=api_record_view&id=44&type=feed" alt="" />

<p><em>Keine ähnlichen Beiträge vorhanden</em></p>]]></content:encoded>
			<wfw:commentRss>http://blog.agrafix.net/2009/08/php-und-register_globals/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quadratische Gleichung Lösen</title>
		<link>http://blog.agrafix.net/2009/07/quadratische-gleichung-losen/</link>
		<comments>http://blog.agrafix.net/2009/07/quadratische-gleichung-losen/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 13:06:42 +0000</pubDate>
		<dc:creator>agrafix</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.agrafix.net/?p=18</guid>
		<description><![CDATA[
			
				
			
		
Um das wp-syntax plugin zu testen habe ich ein kleines PHP Script zum Lösen von quadratischen Gleichungen veröffentlicht:

&#60;?php
/**
 * ax² + bx + c = 0 solver
 * 
 * @author agrafix.net
 */
header&#40;&#34;Content-Type: text/plain;charset=utf-8&#34;&#41;;
&#160;
// input -&#62; ax² + bx + c = 0
$a = 1;
$b = 3;
$c = 1;
&#160;
// calc
print &#34;Eq: &#34;.$a.&#34;x² + &#34;.$b.&#34;x + [...]


<em>Keine ähnlichen Beiträge vorhanden</em>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.agrafix.net%2F2009%2F07%2Fquadratische-gleichung-losen%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.agrafix.net%2F2009%2F07%2Fquadratische-gleichung-losen%2F&amp;source=agrafixblog&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Um das wp-syntax plugin zu testen habe ich ein kleines PHP Script zum Lösen von quadratischen Gleichungen veröffentlicht:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009933; font-style: italic;">/**
 * ax² + bx + c = 0 solver
 * 
 * @author agrafix.net
 */</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type: text/plain;charset=utf-8&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// input -&gt; ax² + bx + c = 0</span>
<span style="color: #000088;">$a</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$b</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$c</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// calc</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;Eq: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$a</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;x² + &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$b</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;x + &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$c</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; = 0<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$d</span> <span style="color: #339933;">=</span> <span style="color: #990000;">pow</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$b</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">*</span><span style="color: #000088;">$a</span><span style="color: #339933;">*</span><span style="color: #000088;">$c</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;D = <span style="color: #006699; font-weight: bold;">$d</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$d</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;L = {}&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000088;">$x1</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #000088;">$b</span> <span style="color: #339933;">+</span> <span style="color: #990000;">sqrt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$d</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span> <span style="color: #339933;">*</span> <span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$x2</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #000088;">$b</span> <span style="color: #339933;">-</span> <span style="color: #990000;">sqrt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$d</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span> <span style="color: #339933;">*</span> <span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$x1</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$x2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;L = {&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x1</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;}&quot;</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: #b1b100;">print</span> <span style="color: #0000ff;">&quot;L = {&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x1</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;, &quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x2</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;}&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<!-- PHP 5.x --><img src="http://blog.agrafix.net/?ak_action=api_record_view&id=18&type=feed" alt="" />

<p><em>Keine ähnlichen Beiträge vorhanden</em></p>]]></content:encoded>
			<wfw:commentRss>http://blog.agrafix.net/2009/07/quadratische-gleichung-losen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
