<?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>VENTRINO TRAFFIC EXCHANGE SCRIPTS &#187; Programming</title>
	<atom:link href="http://www.ventrino.com/blog/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ventrino.com/blog</link>
	<description>TURNING WEB VISITORS INTO BUYERS FOR OUR CUSTOMERS SINCE 1994</description>
	<lastBuildDate>Thu, 11 Aug 2011 15:25:11 +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>How to add a video to your website</title>
		<link>http://www.ventrino.com/blog/586/2010/02/add-video-website/</link>
		<comments>http://www.ventrino.com/blog/586/2010/02/add-video-website/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 18:57:24 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.ventrino.com/blog/?p=586</guid>
		<description><![CDATA[There are hundreds of ways to add video to a WordPress blog, Flash Video is a good place to start.  If all you want is to embed a Youtube then Smart Youtube from Vladimir Prelovac reduces the complex to the ridiculously simple. If you can find the V on your keyboard then you will master [...]]]></description>
			<content:encoded><![CDATA[<p>There are hundreds of ways to add video to a WordPress blog,<em> Flash Video</em> is a good place to start.  If all you want is to embed a Youtube then <em>Smart Youtube</em> from Vladimir Prelovac reduces the complex to the ridiculously simple. If you can find the V on your keyboard then you will master it in a nano second.</p>
<p>But what about a website?  Raw HTML?  Where do you go for that?</p>
<p>I guess I should create a video but until I do here are a few pointers that have worked well for me.  The process from 30,000ft up is:-</p>
<ol>
<li>Locate the place in your HTML you wish to add your video</li>
<li>Paste in the video code</li>
<li>Save the file</li>
</ol>
<p>If you are an HTML webmaster guru this will be elementary stuff.  All you have to do is decide which flavour of video player you are going to offer your visitors.  I tested a few and like <a href="http://flowplayer.org/" target="_blank">flowplayer</a> although their demo videos were broken when I tested them!</p>
<p><strong>How to install flowplayer on your website</strong></p>
<ol>
<li>Download from the free version <a href="http://flowplayer.org/download/index.html" target="_blank">http://flowplayer.org/download/index.html</a></li>
<li>Create a folder off the root of your website and call it flowplayer</li>
<li>Upload these files to the new flowplayer directory you just created
<ul>
<li>flowplayer-3.1.5\flowplayer\example\flowplayer-3.1.4.min.js</li>
<li>flowplayer-3.1.5\flowplayer\flowplayer.controls-3.1.5.swf</li>
<li>flowplayer-3.1.5\flowplayer\flowplayer-3.1.5.swf</li>
</ul>
</li>
</ol>
<p>The version of flowplayer you download maybe different but the principle is likely to stay the same.</p>
<p>That&#8217;s all there is to the installation so let&#8217;s see how we can use it in our web page.  Much of this depends on how you prefer to edit your pages, if you do not know how to edit HTML then search Google for HTML tutorials, there are many companies offering top quality training with free books and videos to get you started.  There are plenty of free editors available too, so if you are starting from scratch google for free html editor too.</p>
<p><strong>Ready to integrate video in your web page</strong></p>
<p>Now you have installed your flowplayer all you need to do is add a few lines of code.  First add the Javascript file in the header.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;flowplayer/flowplayer-3.1.4.min.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Which should look a bit like this when you&#8217;re done:-</p>
<p><img src="http://www.ventrino.com/blog/wp-content/uploads/2010/02/jscript_header.jpg" alt="jscript header How to add a video to your website" title="jscript_header" width="560" /></p>
<p>Locate the position in the HTML where you would like your video and use an Anchor tag and another line of Javascript.</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;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.yourdomain.com/this-will-be/the-path/to-your-video.mp4&quot;</span>  </span>
<span style="color: #009900;"> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;display:block;width:346px;height:193px&quot;</span>  </span>
<span style="color: #009900;"> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;player&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
flowplayer(&quot;player&quot;, &quot;flowplayer/flowplayer-3.1.5.swf&quot;);
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>Alter the size of the video to suit your page design and make sure you keep the ratio between the height and width the same so that it doesn&#8217;t distort the output.</p>
<p><strong>Download an example</strong><br />
<a style="color:red;text-decoration:underline" href='http://www.ventrino.com/blog/wp-content/uploads/2010/02/embed-video-example.zip'>Click here</a> to download everything you need to get started.  This uses flowplayer 3.1.5 so don&#8217;t forget to check their website for updates and new features at flowplayer.org</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ventrino.com/blog/586/2010/02/add-video-website/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Digital River Costs Too Much</title>
		<link>http://www.ventrino.com/blog/419/2010/01/digital-river-costs-too-much/</link>
		<comments>http://www.ventrino.com/blog/419/2010/01/digital-river-costs-too-much/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 18:09:48 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Digital River]]></category>
		<category><![CDATA[payment processor]]></category>

		<guid isPermaLink="false">http://www.ventrino.com/blog/?p=419</guid>
		<description><![CDATA[Dedicated to Rudenko of RoboSoft As a software developer I should not criticise my peers, I am only too well aware of my own shortcomings.  However after 8 years I can no longer be quiet. My angst is over RoboSoft PAD Automation Software, and its excellent. It does exactly what I want, how I want [...]]]></description>
			<content:encoded><![CDATA[<p><em>Dedicated to Rudenko of RoboSoft</em></p>
<p>As a software developer I should not criticise my peers, I am only too well aware of my own shortcomings.  However after 8 years I can no longer be quiet.</p>
<p>My angst is over RoboSoft PAD Automation Software, and its excellent. It does exactly what I want, how I want it to and there are no modifications I want to the way it runs.  It works.</p>
<p><a href="http://www.ventrino.com/blog/wp-content/uploads/2010/01/muskypoo.jpg"><img class="alignright size-full wp-image-431" title="muskypoo" src="http://www.ventrino.com/blog/wp-content/uploads/2010/01/muskypoo.jpg" alt="muskypoo Digital River Costs Too Much" width="262" height="176" /></a>The problem comes with their payment processor, Digital River, whose ability to handle online financial transactions &#8220;outside the box&#8221; is about as effective as a dead muskrat.  If you attempt to purchase from an IP address that is not within 30ft of your billing address you are already in trouble so imagine how they react to someone whose ISP forces them to use a proxy server that spins IP addresses every 15 seconds?</p>
<p>Overcome their inability to understand technology and you might think you are on your way to solving the problem.  ohh no.  Absolutely not!  I am an IT contractor and that takes me around the world, often the UK, Spain, USA and South Africa.  According to Digital River that makes me a terrorist, or a financial risk (but I assume not both).</p>
<p><em><a href="http://www.ventrino.com/blog/wp-content/uploads/2010/01/4515961_blog.jpg"><img class="size-medium wp-image-420 alignleft" title="4515961_blog" src="http://www.ventrino.com/blog/wp-content/uploads/2010/01/4515961_blog-200x300.jpg" alt="4515961 blog 200x300 Digital River Costs Too Much" width="200" height="300" /></a></em></p>
<p>The fact that I have bank accounts that predate the Internet all in good standing, that I have had a Paypal account since January 2000 and &#8220;reputation&#8221; figure in the high thousands carries little influence with them.  Because I exercise my right as a human being to have more than one address in more than one country I am a risk to them.</p>
<p>This means that if I wish to buy something from an organisation that uses one of their companies exclusively then its a lost sale.  And that&#8217;s the problem I have with RoboSoft.  Although I was able to buy from them in April 2003 I have not been able to renew my subscription again except once in 2006.</p>
<p>It was a memorable moment.  Digital River approved payment although I was currently resident in the USA and on holiday in Spain.  The next year, while in the USA I could no longer buy from them.  A US bank registered and billed to my US address made no difference. It appears wherever I am in the world, if I am to buy from a Digital River supplier I must travel to Spain (a welcome prospect if not a touch OTT).</p>
<p>Its as if they &#8220;profile&#8221; their customers and judging by the number they add to the end of my email address each time I attempt to purchase I am suspicious they may be opening an account even though I have not asked for one or given them permission to retain my information (remember, I am not Digital Rivers customer, that has never, nor would ever, be my intention).</p>
<p>I am fed up playing email ping pong with them. I ask a question and they reply with the same answer which boils down to &#8220;We are a big company and only people we condescend to treat as humans may deal with us&#8221;.  Their phone support is even worse&#8230; if you can imagine that.</p>
<p>However it occurred to me this is a bitter blow for Rudenko and RoboSoft, even if he doesn&#8217;t know about it.  Because of Digital Rivers incompetence he has lost $805 in subscription fees due to the years I have not been able to purchase.  Doubtless there are many thousands of people in my business that have the same problem with Digital River, and a few of those may have been Rudenko&#8217;s customers too.</p>
<h2>Where are you Rudenko?</h2>
<p>At times I have complained to Rudenko over the years but he has either ignored the messages or could care less.  Perhaps he is earning enough already.  Who knows.  I&#8217;m even on his &#8220;friend list&#8221; at LinkedIn (he&#8217;ll probably remove me if he reads this) but nothing has ever been done.</p>
<p>Rudenko is $805 worse off and each year he continues to sell subscriptions he continues to lose more money, only he&#8217;s losing an ever increasing amount.  In that position I would do something about it, claiming the Ukraine has problems with money transfers was a weak argument 8 years ago but things have improved dramatically so won&#8217;t wash today.  Whereas DR still has not updated its software to handle VAT properly (They misunderstood the new rules in June 2004 and still do not apply them correctly, but that&#8217;s another issue).</p>
<p>How many more people suffer at the hands of Digital Rivers incompetence?  Search <a href="http://www.google.co.uk/search?hl=en&amp;q=digital+river+scam&amp;meta=" target="_blank">google</a> and you will see there are 642,000 websites for <strong>digital river scam</strong>.  It maybe anecdotal evidence but overwhelming none the less.  Use Digital River exclusively and you are throwing money away, and when there are so many cheaper, more reliable alternatives and much easier to implement its surprising anyone uses them at all.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ventrino.com/blog/419/2010/01/digital-river-costs-too-much/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>MySQL server has gone away (avoid php flush)</title>
		<link>http://www.ventrino.com/blog/360/2009/08/mysql-server-avoid-php-flush/</link>
		<comments>http://www.ventrino.com/blog/360/2009/08/mysql-server-avoid-php-flush/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 13:44:52 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[flush()]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.ventrino.com/blog/?p=360</guid>
		<description><![CDATA[I recently experienced a problem with a complex MySQL query which reported &#8220;MySQL server has gone away&#8221; and then just stopped. There are plenty of posts with suggestions to help you fix this rare but annoying message and it&#8217;s likely they will help you more than this post. However I found a solution, and one [...]]]></description>
			<content:encoded><![CDATA[<p>I recently experienced a problem with a complex MySQL query which reported &#8220;MySQL server has gone away&#8221; and then just stopped.</p>
<p>There are plenty of posts with suggestions to help you fix this rare but annoying message and it&#8217;s likely they will help you more than this post.  However I found a solution, and one that I could replicate so that for my particular issue have conclusive evidence of the cause.  An unusual luxury.</p>
<p><strong>Remove flush()</strong></p>
<p>It is as simple as that.  If you find flush() is called at any time while processing a page that suffers this error, rem it out and try again.  More information on flush() can be found here: http://uk3.php.net/flush</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ventrino.com/blog/360/2009/08/mysql-server-avoid-php-flush/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to do everything in PHP</title>
		<link>http://www.ventrino.com/blog/224/2009/04/php/</link>
		<comments>http://www.ventrino.com/blog/224/2009/04/php/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 11:10:56 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.ventrino.com/blog/?p=224</guid>
		<description><![CDATA[It might take a while for NASA to replace shuttle instrumentation with PHP but who knows what will happen?  Search for new innovation and 9/10 it&#8217;s been developed with PHP and it&#8217;s being offered as open source.  With so many examples and so many people writing about it the Internet has become a giant PHP [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-225" title="phphelp" src="http://www.ventrino.com/blog/wp-content/uploads/2009/04/phphelp.jpg" alt="phphelp How to do everything in PHP" width="317" height="316" />It might take a while for NASA to replace shuttle instrumentation with PHP but who knows what will happen?  Search for new innovation and 9/10 it&#8217;s been developed with PHP and it&#8217;s being offered as open source.  With so many examples and so many people writing about it the Internet has become a giant PHP reference book.</p>
<p>It&#8217;s a physical reference book I would like to see.  Not one that teaches the language, there are  many excellent available already.  A book that covers every possible subject that does not waste time on history or theory but demonstrates by example.  It&#8217;s ok to explain the code, line by line if necessary, but the focus should be demonstrating on how to achieve a goal.</p>
<p>With resources such as php.net and the army of third party developers creating the most amazing code to achieve really trickey stuff the book could also avoid teaching you how to do something that&#8217;s already been done.  A good example is grids.  A common requirement and one with plenty of examples online, but there are no independent reviews without the author seeking an affiliate payout.</p>
<p>The book would list popular choices and demonstrate the benefits in a few pages thus avoiding the online trawl.  If you know of one please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ventrino.com/blog/224/2009/04/php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP to redirect IP addresses to different page</title>
		<link>http://www.ventrino.com/blog/79/2009/01/php-to-redirect-ip-addresses-to-different-page/</link>
		<comments>http://www.ventrino.com/blog/79/2009/01/php-to-redirect-ip-addresses-to-different-page/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 09:12:06 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Traffic Exchange]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.walkersoftware.com/?p=79</guid>
		<description><![CDATA[If you would like to redirect browsers based on their IP the following method can be used to handle multiple IP&#8217;s.  You can choose to redirect entire networks or a single ip. &#60;?php //array of ip's you wish to block. Note that you can block an //entire class by replacing it with 0, so to [...]]]></description>
			<content:encoded><![CDATA[<p>If you would like to redirect browsers based on their IP the following method can be used to handle multiple IP&#8217;s.  You can choose to redirect entire networks or a single ip.</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: #666666; font-style: italic;">//array of ip's you wish to block.  Note that you can block an</span>
<span style="color: #666666; font-style: italic;">//entire class by replacing it with 0, so to block a class c</span>
<span style="color: #666666; font-style: italic;">//(254 computers) use something like 123.123.123.0</span>
<span style="color: #000088;">$blockIP</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'123.123.123.0'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'100.100.100.101'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$remote</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'.'</span><span style="color: #339933;">,</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REMOTE_ADDR'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$blockIP</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$ip</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$goodIP</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	<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: #cc66cc;">4</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: #000088;">$ipSeg</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'.'</span><span style="color: #339933;">,</span><span style="color: #000088;">$ip</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$remote</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$ipSeg</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$ipSeg</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'0'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #666666; font-style: italic;">//segment qualifies</span>
      <span style="color: #000088;">$goodIP</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</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: #666666; font-style: italic;">//ip no good so move to the next</span>
      <span style="color: #000088;">$goodIP</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">continue</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$goodIP</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">//ip passes so no need to check the rest</span>
    <span style="color: #000088;">$blockThisIP</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ip</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;">//for convenience test $blockThisIP and process here</span>
<span style="color: #666666; font-style: italic;">//replace www.crayola.com with the place you wish to</span>
<span style="color: #666666; font-style: italic;">//send ip's too</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$blockThisIP</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">//php header method - can only use this if the page</span>
  <span style="color: #666666; font-style: italic;">//has not begin to display in the browser</span>
  <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Location: http://www.crayola.com'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//javascript redirection - use this method if browser has</span>
  <span style="color: #666666; font-style: italic;">//begun to display page</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;script type=&quot;</span>text<span style="color: #339933;">/</span>javascript<span style="color: #0000ff;">&quot;&gt;
  window.location = &quot;</span>http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//www.crayola.com&quot;;&lt;/script&gt;&quot;;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.ventrino.com/blog/79/2009/01/php-to-redirect-ip-addresses-to-different-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Three little characters ï»¿ designed to make your life hell</title>
		<link>http://www.ventrino.com/blog/60/2008/07/three-little-characters-i%c2%bb%c2%bf-designed-to-make-your-life-hell/</link>
		<comments>http://www.ventrino.com/blog/60/2008/07/three-little-characters-i%c2%bb%c2%bf-designed-to-make-your-life-hell/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 09:28:12 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ï»¿]]></category>
		<category><![CDATA[UTF-8]]></category>

		<guid isPermaLink="false">http://www.walkersoftware.com/?p=60</guid>
		<description><![CDATA[On more than one occasion these characters ï»¿ have turned up just when everything else seems fine.  Like a tiny weeney scratch on a new car, one that only you know about, these little bastards turn up and take the rest of the day to diagnose.  So what ï»¿ is for? ï»¿ cannot be smoked [...]]]></description>
			<content:encoded><![CDATA[<p>On more than one occasion these characters ï»¿ have turned up just when everything else seems fine.  Like a tiny weeney scratch on a new car, one that only you know about, these little bastards turn up and take the rest of the day to diagnose. </p>
<p>So what ï»¿ is for?</p>
<ul>
<li>ï»¿ cannot be smoked or injected</li>
<li>Too much ï»¿ causes stress in older programmers</li>
<li>Does ï»¿ increase or decrease carbon emissions?</li>
<li>is ï»¿ useful for anything?  How does it help?</li>
</ul>
<p style="font-size:18px;font-weight:bold">What is ï»¿ ???</p>
<p>ï»¿ is often seen at the top left corner of a web page.  When you open the source file and compare that to the output source you will not find ï»¿, so what causes ï»¿ to appear in your file?</p>
<p>The secret to diagnosing ï»¿ is to avoid looking for the obvious.  If you have code that looks like this:-</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: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Hello World&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>placed in a file called hello.php and you run this directly (ie not as an include file) then you may wonder wtf is going on?  How come ï»¿ turns up?  When you run it the output looks like this:-</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
ï»¿Hello World</pre></div></div>

<p>The reason is your editor has saved the file as UTF-8.  With the ever increasing complexity of character encoding some editors will automatically ignore your settings and update your configuration to use UTF-8.  Even if you have been using ASCII without any trouble since 1982!</p>
<p>So what you may ask?  Winjii, it&#8217;s so you can type in Winjii.  Not sure what it is, but the 127 characters provided by ASCII&#8217;s not enough for some languages, they need more because they are not able to express themselves with so few characters.</p>
<p>Well there&#8217;s ï»¿*$@#ï»¿ chance that I will ever need any more so the solution at least for me is straightforward.</p>
<p style="font-size:18px;font-weight:bold">The Fix</p>
<p>Change the character encoding of your page.  With most editors all you need to do is select properties and then choose ASCII then save the file. </p>
<p>Changing the meta tag alone is not enough, with extended attributes on files now no one can be sure where a browser or whatever reader your using will use to determine how to display it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ventrino.com/blog/60/2008/07/three-little-characters-i%c2%bb%c2%bf-designed-to-make-your-life-hell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Limiting text input to characters and digits</title>
		<link>http://www.ventrino.com/blog/59/2008/07/limiting-text-input-to-characters-and-digits/</link>
		<comments>http://www.ventrino.com/blog/59/2008/07/limiting-text-input-to-characters-and-digits/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 14:10:39 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://www.walkersoftware.com/programming/59/limiting-text-input-to-characters-and-digits/</guid>
		<description><![CDATA[To remove stuff such as punction and spaces (or anything you want) from a text box before sending to the server for validation you can use code like this, first the HTML:- &#60;input name=&#34;name&#34; onblur=&#34;this.value = entrycheck(this.value);&#34; type=&#34;text&#34; size=&#34;20&#34;&#62; And then the following Javascript will remove invalid characters when the user moves to another field:- [...]]]></description>
			<content:encoded><![CDATA[<p>To remove stuff such as punction and spaces (or anything you want) from a text box before sending to the server for validation you can use code like this, first the HTML:-</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;input
name=&quot;name&quot;
onblur=&quot;this.value = entrycheck(this.value);&quot;
type=&quot;text&quot;
size=&quot;20&quot;&gt;</pre></div></div>

<p>And then the following Javascript will remove invalid characters when the user moves to another field:-</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #003366; font-weight: bold;">function</span> namecheck<span style="color: #009900;">&#40;</span>theInput<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #003366; font-weight: bold;">var</span> valid <span style="color: #339933;">=</span> <span style="color: #3366CC;">'abcdefghijklmnopqrstuvwxyz1234567890'</span><span style="color: #339933;">;</span>
  <span style="color: #003366; font-weight: bold;">var</span> test <span style="color: #339933;">=</span><span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
  <span style="color: #003366; font-weight: bold;">var</span> ret <span style="color: #339933;">=</span><span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&lt;</span>theInput.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    test <span style="color: #339933;">=</span> theInput.<span style="color: #660066;">substr</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>valid.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span>test.<span style="color: #660066;">toLowerCase</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: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      ret <span style="color: #339933;">=</span> ret <span style="color: #339933;">+</span> test<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000066; font-weight: bold;">return</span> ret<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>In this example I just want digits and characters.  If you want to add certain punctuation such as stops and commas just add them to the valid variable.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ventrino.com/blog/59/2008/07/limiting-text-input-to-characters-and-digits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software Engineering Tips For Startups</title>
		<link>http://www.ventrino.com/blog/53/2007/12/software-engineering-tips-for-startups/</link>
		<comments>http://www.ventrino.com/blog/53/2007/12/software-engineering-tips-for-startups/#comments</comments>
		<pubDate>Wed, 05 Dec 2007 04:35:30 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.walkersoftware.com/investment/53/software-engineering-tips-for-startups/</guid>
		<description><![CDATA[Seven years ago I tried to persuade my business partners and investors not to outsource our startup development to Oracle, but at the time &#8216;the city&#8217; could not understand how two or three passionate programmers could compare with the might of a 20 strong team of Oracle professionals. BlueBlog Alex article Software Engineering Tips For [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://ventrino.com/blog/wp-content/uploads/2007/12/software_engineering_boardroom.png" alt="software engineering boardroom Software Engineering Tips For Startups" align="right" border="0" hspace="30" title="Software Engineering Tips For Startups" />Seven years ago I tried to persuade my business partners and investors not to outsource our startup development to Oracle, but at the time &#8216;the city&#8217; could not understand how two or three passionate programmers could compare with the might of a 20 strong team of Oracle professionals.</p>
<p>BlueBlog Alex article <a href="http://blog.adaptiveblue.com/wp-trackback.php?p=765" title="Software Engineering For Startups" target="_blank">Software Engineering Tips For Startups</a> provides an explanation of the issues the project suffered albeit unwittingly at the time.</p>
<p>The detachment of the programmers supplied by the outsourcing agency meant it was impossible for them to understand our passions and goals.  They clocked in at 9.00am and were out by 5.00pm at the latest.  Their conversation focused on TV, football and who was being promoted where in the company.</p>
<p>Their attitude was infectious and soon the original hand picked team was dissolusioned and faded into the background noise of the companies general operation.</p>
<p>But the company hasn&#8217;t failed.  Seven years after funding it remains a veteran of the pre-bubble-bursting-funded-but-not -IPO&#8217;d companies.  There&#8217;s not many of them left today.  Their success, if you can call it that, has been due to two general business factors.</p>
<ol>
<li>The investors have put so much cash into the company they are not willing to let it go.</li>
<li>Eliminating innovation and rationalising everything to a core product where they can rely on Investor relations to produce business.</li>
</ol>
<p>It may pay the bills but it&#8217;s <a href="http://en.wikipedia.org/wiki/Hobson's_choice" title="They only have one choice" target="_blank">Hobsons Choice</a>, they exist at the behest of the investor who provides cash and customers.</p>
<blockquote><p>The only regret they have is not knowing where it would have gone had they been brave enough to give the original business a chance to develop.</p></blockquote>
<p>They had an opportunity to launch the first community based business of it&#8217;s kind but that meant relying on a handful of super-geeks.  Something institutional investors claimed they would never do.</p>
<p>Where are those investors now?  They&#8217;re still there and they still have their hands on the controls, but they wobble from one investment to the next while Google, Yahoo and Microsoft cream off the best.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ventrino.com/blog/53/2007/12/software-engineering-tips-for-startups/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

