<?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>NEUBER-WEB-SOLUTIONS :: We support your ECommerce &#124; &#187; Programming infos and tutorials</title>
	<atom:link href="http://www.neuber-web-solutions.de/category/programming-infos-tutorials/feed" rel="self" type="application/rss+xml" />
	<link>http://www.neuber-web-solutions.de</link>
	<description></description>
	<lastBuildDate>Thu, 02 Sep 2010 13:46:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>The famous FPDF error: &#8220;Not a JPEG file&#8221;</title>
		<link>http://www.neuber-web-solutions.de/programming-infos-tutorials/the-famous-fpdf-error-not-a-jpeg-file</link>
		<comments>http://www.neuber-web-solutions.de/programming-infos-tutorials/the-famous-fpdf-error-not-a-jpeg-file#comments</comments>
		<pubDate>Tue, 01 Jun 2010 19:19:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming infos and tutorials]]></category>

		<guid isPermaLink="false">http://www.neuber-web-solutions.de/?p=922</guid>
		<description><![CDATA[Now and then when you work with FPDF you may encounter this error: &#8220;FPDF error: [...]]]></description>
			<content:encoded><![CDATA[<p>Now and then when you work with FPDF you may encounter this error:<br />
<strong>&#8220;FPDF error: Not a JPEG file&#8221;</strong></p>
<p>The confusing point about this error is, that this is also displayed if your file in question has an .jpg/.jpeg ending. </p>
<p>So in case you changed the ending of an .PNG image file to .JPG ,assuming that this makes the image to a JPG-Image &#8211; let me tell you: FPDF is smarter</p>
<p>Every image file has a characteristic beginning. The 2nd to 4th character of an PNG is&#8230; yes&#8230; PNG.<br />
You see it here &#8211; this is a file with the extension .jpg opened in the Texteditor Notepad++ :<br />
<a class="lightbox"  title ="PNG-starting" href="http://www.neuber-web-solutions.de/wp-content/uploads/2010/06/PNG-starting.gif"><img src="http://www.neuber-web-solutions.de/wp-content/uploads/2010/06/PNG-starting.gif" alt="" title="PNG-starting" width="279" height="68" class="alignnone size-full wp-image-924" /></a></p>
<p>Obviously FPDF checks for this and throws then an error (if the file extension is not corresponding).<br />
Solution: make sure its really, thru &#038; thru a .jpg</p>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neuber-web-solutions.de/programming-infos-tutorials/the-famous-fpdf-error-not-a-jpeg-file/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How does the AIM CURL call to Authorize.net look like?</title>
		<link>http://www.neuber-web-solutions.de/programming-infos-tutorials/how-does-the-aim-curl-call-to-authorize-net-look-like</link>
		<comments>http://www.neuber-web-solutions.de/programming-infos-tutorials/how-does-the-aim-curl-call-to-authorize-net-look-like#comments</comments>
		<pubDate>Sun, 30 May 2010 17:17:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming infos and tutorials]]></category>
		<category><![CDATA[Payment]]></category>

		<guid isPermaLink="false">http://www.neuber-web-solutions.de/?p=901</guid>
		<description><![CDATA[Actually its only some lines of code (which you can also find in the Authorize.net [...]]]></description>
			<content:encoded><![CDATA[<p>Actually its only some lines of code (which you can also find in the Authorize.net AIM sample code): </p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="re0">$request</span> <span class="sy0">=</span> <a href="http://www.php.net/curl_init"><span class="kw3">curl_init</span></a><span class="br0">&#40;</span><span class="re0">$post_url</span><span class="br0">&#41;</span><span class="sy0">;</span> </p>
<p><a href="http://www.php.net/curl_setopt"><span class="kw3">curl_setopt</span></a><span class="br0">&#40;</span><span class="re0">$request</span><span class="sy0">,</span> CURLOPT_HEADER<span class="sy0">,</span> 0<span class="br0">&#41;</span><span class="sy0">;</span><br />
<a href="http://www.php.net/curl_setopt"><span class="kw3">curl_setopt</span></a><span class="br0">&#40;</span><span class="re0">$request</span><span class="sy0">,</span> CURLOPT_RETURNTRANSFER<span class="sy0">,</span> 1<span class="br0">&#41;</span><span class="sy0">;</span><br />
<a href="http://www.php.net/curl_setopt"><span class="kw3">curl_setopt</span></a><span class="br0">&#40;</span><span class="re0">$request</span><span class="sy0">,</span> CURLOPT_POSTFIELDS<span class="sy0">,</span> <span class="re0">$post_string</span><span class="br0">&#41;</span><span class="sy0">;</span> <br />
<span class="re0">$post_response</span> <span class="sy0">=</span> <a href="http://www.php.net/curl_exec"><span class="kw3">curl_exec</span></a><span class="br0">&#40;</span><span class="re0">$request</span><span class="br0">&#41;</span><span class="sy0">;</span> <br />
<a href="http://www.php.net/curl_close"><span class="kw3">curl_close</span></a> <span class="br0">&#40;</span><span class="re0">$request</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">// close curl object</span></p>
<p><span class="co1">// Following line takes the response</span><br />
<span class="re0">$response_array</span> <span class="sy0">=</span> <a href="http://www.php.net/explode"><span class="kw3">explode</span></a><span class="br0">&#40;</span><span class="re0">$post_values</span><span class="br0">&#91;</span><span class="st0">&quot;x_delim_char&quot;</span><span class="br0">&#93;</span><span class="sy0">,</span><span class="re0">$post_response</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>Keep in mind: your website can only sent a CURL call if your PHP has the CURL module implemented. </p>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neuber-web-solutions.de/programming-infos-tutorials/how-does-the-aim-curl-call-to-authorize-net-look-like/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux or Windows server &#8211; this is here the question&#8230;</title>
		<link>http://www.neuber-web-solutions.de/programming-infos-tutorials/linux-or-windows-server-this-is-here-the-question</link>
		<comments>http://www.neuber-web-solutions.de/programming-infos-tutorials/linux-or-windows-server-this-is-here-the-question#comments</comments>
		<pubDate>Tue, 09 Mar 2010 17:31:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming infos and tutorials]]></category>

		<guid isPermaLink="false">http://www.neuber-web-solutions.de/?p=699</guid>
		<description><![CDATA[Now and then a PHP programmer needs to figure out, if a script runs on [...]]]></description>
			<content:encoded><![CDATA[<p>Now and then a PHP programmer needs to figure out, if a script runs on a Linux- or Windows server. Of course you can always consult <strong>phpinfo()</strong> and check the info in the first line next to &#8216;System&#8217;. But for the further processing in scripts the function <strong>phpinfo()</strong> is not the best candidate. </p>
<p>Happily PHP offers us at least 3 other possibilities to find out:</p>
<p><span style="text-decoration: underline;"><strong>Possibility No.1:</strong></span></p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="kw1">echo</span> <span class="kw4">PHP_OS</span><span class="sy0">;</span></div>
</div>
<p>A windows server will return here usually the value &#8220;WINNT&#8221;.<br />
<br/></p>
<p><span style="text-decoration: underline;"><strong>Possibility No.2:</strong></span></p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="kw1">echo</span> <a href="http://www.php.net/php_uname"><span class="kw3">php_uname</span></a><span class="br0">&#40;</span><span class="st_h">&#8216;s&#8217;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>With a Windows-Server we get a result like &#8220;Windows NT&#8221;. You could use this then in a strpos() query like here:</p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/strpos"><span class="kw3">strpos</span></a><span class="br0">&#40;</span><span class="re0">$os_info</span><span class="sy0">,</span><span class="st_h">&#8216;Windows&#8217;</span><span class="br0">&#41;</span> <span class="sy0">!==</span> <span class="kw4">FALSE</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
    <span class="kw1">echo</span> <span class="st0">&quot;YES, this is a windows box&#8230;&quot;</span><span class="sy0">;</span><br />
 <span class="br0">&#125;</span></div>
</div>
<p><br/></p>
<p><span style="text-decoration: underline;"><strong>Possibility No.3:</strong></span></p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="kw1">echo</span> <span class="kw4">DIRECTORY_SEPARATOR</span><span class="sy0">;</span></div>
</div>
<p>PHP provides for us a constant for the separator used in directories of the server. Windows systems as we know use the separator \ . So you could use this again for a PHP query with the function strpos() :</span></p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/strpos"><span class="kw3">strpos</span></a><span class="br0">&#40;</span><span class="kw4">DIRECTORY_SEPARATOR</span> <span class="sy0">!=</span> <span class="st_h">&#8216;/&#8217;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
    <span class="kw1">echo</span> <span class="st0">&quot;Again! A windows server&quot;</span><span class="sy0">;</span><br />
 <span class="br0">&#125;</span></div>
</div>
<p><br/><br />
&#8212;-<br />
&#8230;.I&#8217;m quite that these possibilities are not the only ones &#8211; further possibilities are very much appreciated <img src='http://www.neuber-web-solutions.de/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<p><br/><br />
<br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neuber-web-solutions.de/programming-infos-tutorials/linux-or-windows-server-this-is-here-the-question/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>International Postal Address Formats &#8211; Where to find them?</title>
		<link>http://www.neuber-web-solutions.de/programming-infos-tutorials/international-postal-address-formats-where-to-find-them</link>
		<comments>http://www.neuber-web-solutions.de/programming-infos-tutorials/international-postal-address-formats-where-to-find-them#comments</comments>
		<pubDate>Thu, 25 Jun 2009 10:49:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming infos and tutorials]]></category>

		<guid isPermaLink="false">http://www.neuber-web-solutions.de/?p=427</guid>
		<description><![CDATA[A while ago we made a small but important change to our WordPress ecommerce themes. [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago we made a small but important change to our WordPress ecommerce themes. Instead of nation-wide sales also international orders were now possible. This led to another challenge: postal address have different formats in different countries.<br />
You may wonder: &#8220;&#8230;and, whats the big deal with this?&#8221;<br />
Well, lets have a look at the classic example of two Joe Doe&#8217;s, one living in the US and the other one in Germany. The different addresses would be:</p>
<p><span style="text-decoration: underline;">USA:</span></p>
<p>JOE DOE<br />
1500 E MAIN AVE STE 201<br />
SPRINGFIELD VA 22162–1010<br />
UNITED STATES OF AMERICA</p>
<p><span style="text-decoration: underline;">Germany:</span></p>
<p>Joe Doe<br />
Teststr.  1a<br />
11111 TESTSTADT<br />
GERMANY</p>
<p>If I typed the data of the second Joe Doe into the address form of my E-Commerce application fitting for US-addresses, then I would get an address like this:</p>
<p>JOE DOE<br />
1A TESTSTRASSE<br />
TESTSTADT BAYERN 11111<br />
GERMANY</p>
<p>I can assure you that this will confuse German shop owners + the German national postal delivery services (Deutsche Bundespost).</p>
<p><strong></strong></p>
<p><strong>Ok &#8211; so where can I get the information from?<br />
</strong>Happily, there exists an international organization which takes care of these issues &#8211; the UPU, Universal Postal Union.<br />
They give you here the officially correct address format for every country: <a href="http://www.upu.int/en/activities/addressing/postal-addressing-systems-in-member-countries.html">http://www.upu.int/en/activities/addressing/postal-addressing-systems-in-member-countries.html</a> &#8211; (interestingly, it doesn&#8217;t like Opera as browser)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neuber-web-solutions.de/programming-infos-tutorials/international-postal-address-formats-where-to-find-them/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Chart Api &#8211; Create a simple pie chart</title>
		<link>http://www.neuber-web-solutions.de/programming-infos-tutorials/google-chart-api-create-a-simple-pie-chart</link>
		<comments>http://www.neuber-web-solutions.de/programming-infos-tutorials/google-chart-api-create-a-simple-pie-chart#comments</comments>
		<pubDate>Wed, 24 Jun 2009 08:03:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming infos and tutorials]]></category>

		<guid isPermaLink="false">http://www.neuber-web-solutions.de/?p=416</guid>
		<description><![CDATA[This pie chart looks better than some dry ratio numbers, isn&#8217;t it? The pie chart [...]]]></description>
			<content:encoded><![CDATA[<p>This pie chart looks better than some dry ratio numbers, isn&#8217;t it?</p>
<p><img src="http://chart.apis.google.com/chart?chs=250x100&amp;chd=t:10,90&amp;cht=p3&amp;chl=Smart|Silly" alt="Sample chart" /></p>
<p>The pie chart above can be created on the fly with this simple piece of html code:</p>
<p>&lt;img src=&#8221;<a href="http://chart.apis.google.com/chart">http://chart.apis.google.com/chart</a>?<br />
chs=250&#215;100<br />
&amp;amp;chd=t:10,90<br />
&amp;amp;cht=p3<br />
&amp;amp;chl=Smart|Silly&#8221;<br />
alt=&#8221;Sample chart&#8221; /&gt;</p>
<p>Interesting here:</p>
<p>1. With <a href="http://chart.apis.google.com/chart">http://chart.apis.google.com/chart</a> you call the Google Chart Api</p>
<p>2. This alone gives us of course not yet a nice pie chart &#8211; we have to add some parameters</p>
<p>For example with <strong>&amp;amp;chd=t:10,90</strong> we get a 10% | 90% ratio of the pie chart.<br />
Means you could manipulate this ratio with some php values. The number of smart people might increase&#8230;</p>
<p>&lt;?php<br />
$silly = 5;<br />
$smart = 95;<br />
?&gt;</p>
<p>&lt;img src=&#8221;<a href="http://chart.apis.google.com/chart">http://chart.apis.google.com/chart</a>?<br />
chs=250&#215;100<br />
&amp;amp;chd=t:&lt;?= $silly ?&gt;,&lt;?= $smart ?&gt;<br />
&amp;amp;cht=p3<br />
&amp;amp;chl=Smart|Silly&#8221;<br />
alt=&#8221;Sample chart&#8221; /&gt;</p>
<p>Ideal for web statistics&#8230;</p>
<p>3. More information about cool charts with the Google Chart Api you can find here: <a href="http://code.google.com/intl/de-DE/apis/chart/types.html#pie_charts">http://code.google.com/intl/en/apis/chart/types.html#pie_charts</a></p>
<p>4. And, its also possible to highlight countries on a map</p>
<p><img src="http://chart.apis.google.com/chart?cht=t&amp;chs=440x220&amp;chd=s:9&amp;chco=,333333,&amp;chld=DE&amp;chtm=europe&amp;chf=bg,s," alt="Where is Germany?" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neuber-web-solutions.de/programming-infos-tutorials/google-chart-api-create-a-simple-pie-chart/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
