<?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; PHP</title>
	<atom:link href="http://www.ventrino.com/blog/tag/php/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>What makes a competent programmer?</title>
		<link>http://www.ventrino.com/blog/296/2009/05/competent-programmer/</link>
		<comments>http://www.ventrino.com/blog/296/2009/05/competent-programmer/#comments</comments>
		<pubDate>Fri, 22 May 2009 09:25:51 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[Fun Stuff]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.ventrino.com/blog/?p=296</guid>
		<description><![CDATA[Ever wondered how to tell if you are hiring a competent programmer?  In the following video Ron Burk discusses the Psychology of Incompetence in which he leaves you with no illusions. www.youtube.com/watch?v=L_vcy7I0zIM If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization]]></description>
			<content:encoded><![CDATA[<p>Ever wondered how to tell if you are hiring a competent programmer?  In the following video Ron Burk discusses the Psychology of Incompetence in which he leaves you with no illusions.</p>
<p style="text-align: center;"><span class="youtube">
<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/L_vcy7I0zIM?modestbranding=1&amp;fs=1&amp;hl=en&amp;loop=&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=1&amp;theme=dark" />
<param name="allowFullScreen" value="true" />
<embed wmode="opaque" src="http://www.youtube.com/v/L_vcy7I0zIM?modestbranding=1&amp;fs=1&amp;hl=en&amp;loop=&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=1&amp;theme=dark" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="355"></embed>
<param name="wmode" value="opaque" />
</object>
</span><p><a href="http://www.youtube.com/watch?v=L_vcy7I0zIM">www.youtube.com/watch?v=L_vcy7I0zIM</a></p></p>
<p><em>If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ventrino.com/blog/296/2009/05/competent-programmer/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>
	</channel>
</rss>

