<?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>#0092FF Tech Blog &#187; Scripts</title>
	<atom:link href="http://www.0092ff.com/category/scripts/feed" rel="self" type="application/rss+xml" />
	<link>http://www.0092ff.com</link>
	<description>This is a blog about tips and tricks that I find while working on computers and building websites.</description>
	<lastBuildDate>Wed, 01 Sep 2010 13:10:12 +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>AJAX Contact Form with CAPTCHA</title>
		<link>http://www.0092ff.com/web-development/ajax-contact-form-with-captcha</link>
		<comments>http://www.0092ff.com/web-development/ajax-contact-form-with-captcha#comments</comments>
		<pubDate>Fri, 21 May 2010 16:52:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[CAPTCHA]]></category>
		<category><![CDATA[Contact Form]]></category>

		<guid isPermaLink="false">http://www.0092ff.com/?p=1052</guid>
		<description><![CDATA[With the redesign of BFX Media, I&#8217;ve been trying to find the perfect contact form that works with the new layout. As of yesterday, my search has ended. I found the perfect contact form that uses AJAX and has CAPTCHA security. I spent a few hours yesterday and today tweaking the layout, but it&#8217;s all [...]]]></description>
			<content:encoded><![CDATA[<p>With the redesign of <a href="http://www.bfxmedia.com">BFX Media</a>, I&#8217;ve been trying to find the perfect contact form that works with the new layout. As of yesterday, my search has ended. I found the perfect contact form that uses AJAX and has CAPTCHA security. I spent a few hours yesterday and today tweaking the layout, but it&#8217;s all done.</p>
<p><a href="http://www.bitrepository.com/ajax-contact-form-with-captcha-realtime-validator-and-php-backend.html">AJAX Contact Form with CAPTCHA, Realtime Validator and PHP Backend</a></p>
<p><strong>Features:</strong><br />
* Real-time Form Validation that makes the form completion process interactive (can be enabled/disabled)<br />
* Both JavaScript &#038; PHP Validation<br />
* Powerful CAPTCHA (Image Verification) with refresh feature (enable/disable it)<br />
* Ability to easy add/edit/delete fields<br />
* The form gracefully degrades into a simple PHP Contact Form if JavaScript is disabled<br />
* Auto Responder (customizable)<br />
* Ability to integrate the values from the form (beside the actual message) into the mail body<br />
* Tableless Form (does not use tables)<br />
* The e-mail templates (message, subject) are customizable<br />
* The errors and the notifications can be easily changed<br />
* Option to redirect the user to a custom &#8216;Thank you&#8217; page<br />
* The script works in conjunction with other libraries beside jQuery such as MooTools or Prototype<br />
* Set a custom subject for the mail that you receive if the subject field is removed<br />
* Free Support (in case you are having trouble installing the script)<br />
* A help page (documentation) that will guide you through the script setup</p>
<p><a href="http://www.bitrepository.com/go/ajax-contact-form-premium/demo/">View Demo</a><br />
<a href="http://www.bfxmedia.com">See it live @ BFX Media</a> (click on Contact)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.0092ff.com/web-development/ajax-contact-form-with-captcha/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easily Redirect To A Random URL Using PHP</title>
		<link>http://www.0092ff.com/scripts/easily-redirect-to-a-random-url-using-php</link>
		<comments>http://www.0092ff.com/scripts/easily-redirect-to-a-random-url-using-php#comments</comments>
		<pubDate>Mon, 29 Jun 2009 11:54:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[redirct]]></category>

		<guid isPermaLink="false">http://www.0092ff.com/?p=754</guid>
		<description><![CDATA[Using the code below, you can send a visitor to one URL and then have them redirected to a random URL. All you have to do is open notepad, copy the code below, change the addresses and then save it as &#8220;whatever.php&#8221;. You can also add more addresses by adding more lines and changing the [...]]]></description>
			<content:encoded><![CDATA[<p>Using the code below, you can send a visitor to one URL and then have them redirected to a random URL. All you have to do is open notepad, copy the code below, change the addresses and then save it as &#8220;whatever.php&#8221;. You can also add more addresses by adding more lines and changing the number.</p>

<div class="wp_codebox"><table><tr id="p7542"><td class="code" id="p754code2"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$url</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://www.google.com&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$url</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://www.yahoo.com&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$url</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://www.47movies.com&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">srand</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>double<span style="color: #009900;">&#41;</span><span style="color: #990000;">microtime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">1000000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$randomnum</span> <span style="color: #339933;">=</span> <span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">header</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location: <span style="color: #006699; font-weight: bold;">$url</span>[<span style="color: #006699; font-weight: bold;">$randomnum</span>]&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Right now, I&#8217;m using this to redirect visitors to a random sponsor on a website that I recently closed down. I redirect all 404s to the index of the site using htaccess and then the index.php file contains the random redirect.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.0092ff.com/scripts/easily-redirect-to-a-random-url-using-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hiding Affiliate Links With PHP</title>
		<link>http://www.0092ff.com/scripts/hiding-affiliate-links-with-php</link>
		<comments>http://www.0092ff.com/scripts/hiding-affiliate-links-with-php#comments</comments>
		<pubDate>Fri, 16 Jan 2009 14:52:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[link cloaking]]></category>
		<category><![CDATA[url redirect]]></category>

		<guid isPermaLink="false">http://www.0092ff.com/?p=410</guid>
		<description><![CDATA[While I was working on a new layout for my main site, I thought about implementing a system of &#8220;hiding&#8221; affiliate links and making them appear cleaner.
So, instead of this:
http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=bigfish
I wanted something like this:
http://www.0092ff.com/go.php?id=hostgator
I found a ton of scripts that would allow me to do this, both free and paid versions, but I couldn&#8217;t find [...]]]></description>
			<content:encoded><![CDATA[<p>While I was working on a new layout for my main site, I thought about implementing a system of &#8220;hiding&#8221; affiliate links and making them appear cleaner.</p>
<p>So, instead of this:</p>
<p>http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=bigfish</p>
<p>I wanted something like this:</p>
<p>http://www.0092ff.com/go.php?id=hostgator</p>
<p>I found a ton of scripts that would allow me to do this, both free and paid versions, but I couldn&#8217;t find exactly what I wanted. I tested out a couple free scripts, but I didn&#8217;t like the way the links were created.</p>
<p>After a while I stumbled upon this simple PHP code that would allow me to do exactly what I wanted to do, without all the bells and whistles.</p>
<p>Create a text file and copy/paste the following code:</p>

<div class="wp_codebox"><table><tr id="p4104"><td class="code" id="p410code4"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
  <span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$links</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">&quot;google&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;http://google.com&quot;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">&quot;yahoo&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;http://yahoo.com&quot;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">&quot;wikipedia&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;http://wikipedia.org&quot;</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$links</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #990000;">exit</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Then, just change the names and link codes to fit your needs. Save the file as &#8220;go.php&#8221; and then set up your links like this:</p>
<p>http://www.yourdomain.com/go.php?id=google</p>
<p>http://www.yourdomain.com/go.php?id=yahoo</p>
<p>http://www.yourdomain.com/go.php?id=wikipedia</p>
<p>If you want to add more links, just copy/paste another line in. You have to pay attention to where your commas are placed though.</p>
<p>It doesn&#8217;t get any easier than that!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.0092ff.com/scripts/hiding-affiliate-links-with-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random Text Link Script</title>
		<link>http://www.0092ff.com/scripts/random-text-link-script</link>
		<comments>http://www.0092ff.com/scripts/random-text-link-script#comments</comments>
		<pubDate>Thu, 18 Dec 2008 17:59:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[random link]]></category>

		<guid isPermaLink="false">http://www.0092ff.com/?p=367</guid>
		<description><![CDATA[This is a very simple script that will insert a random text link in a desired location. All you have to do is copy the text below and paste it in notepad and name it &#8220;random.php&#8221;.

&#60;?
$random_url = array&#40;&#34;http://www.google.com/1&#34;,
                  [...]]]></description>
			<content:encoded><![CDATA[<p>This is a very simple script that will insert a random text link in a desired location. All you have to do is copy the text below and paste it in notepad and name it &#8220;random.php&#8221;.</p>

<div class="wp_codebox"><table><tr id="p3677"><td class="code" id="p367code7"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #000088;">$random_url</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://www.google.com/1&quot;</span><span style="color: #339933;">,</span>
                    <span style="color: #0000ff;">&quot;http://www.google.com/2&quot;</span><span style="color: #339933;">,</span>
                    <span style="color: #0000ff;">&quot;http://www.google.com/3&quot;</span><span style="color: #339933;">,</span>
                    <span style="color: #0000ff;">&quot;http://www.google.com/4&quot;</span><span style="color: #339933;">,</span>
                    <span style="color: #0000ff;">&quot;http://www.google.com/5&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$url_title</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Google Link 1&quot;</span><span style="color: #339933;">,</span>
                   <span style="color: #0000ff;">&quot;Google Link 2&quot;</span><span style="color: #339933;">,</span>
                   <span style="color: #0000ff;">&quot;Google Link 3&quot;</span><span style="color: #339933;">,</span>
                   <span style="color: #0000ff;">&quot;Google Link 4&quot;</span><span style="color: #339933;">,</span>
                   <span style="color: #0000ff;">&quot;Google Link 5&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">srand</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">time</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: #000088;">$sizeof</span> <span style="color: #339933;">=</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$random_url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$random</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">%</span><span style="color: #000088;">$sizeof</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">print</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;a href=&quot;</span><span style="color: #000088;">$random_url</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$random</span><span style="color: #009900;">&#93;</span><span style="color: #0000ff;">&quot;&gt;<span style="color: #006699; font-weight: bold;">$url_title</span>[<span style="color: #006699; font-weight: bold;">$random</span>]&lt;/a&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Then, insert the following code in your php file where you want the link to appear.</p>

<div class="wp_codebox"><table><tr id="p3678"><td class="code" id="p367code8"><pre class="html" style="font-family:monospace;">&lt;?php include (&quot;random.php&quot;); ?&gt;</pre></td></tr></table></div>

<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.0092ff.com/scripts/random-text-link-script/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix LinkEX and .htaccess conflicts</title>
		<link>http://www.0092ff.com/scripts/how-to-fix-linkex-and-htaccess-conflicts</link>
		<comments>http://www.0092ff.com/scripts/how-to-fix-linkex-and-htaccess-conflicts#comments</comments>
		<pubDate>Tue, 30 Sep 2008 13:29:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[301 redirect]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[LinkEX]]></category>

		<guid isPermaLink="false">http://www.0092ff.com/?p=246</guid>
		<description><![CDATA[Last month I discussed using 301 redirects to avoid duplicate content and now I&#8217;d like to expand on that topic with something I just learned this morning. On a few of my sites, I&#8217;m using a script named LinkEX to trade text links with other sites. It seems that there is a conflict when using [...]]]></description>
			<content:encoded><![CDATA[<p>Last month I discussed <a href="http://www.0092ff.com/web-development/using-301-redirects-to-avoid-duplicate-content" target="_self">using 301 redirects to avoid duplicate content</a> and now I&#8217;d like to expand on that topic with something I just learned this morning. On a few of my sites, I&#8217;m using a script named <a href="http://linkex.dk/" target="_blank">LinkEX</a> to trade text links with other sites. It seems that there is a conflict when using the 301 redirect method mentioned above with LinkEX. When I would try to login, the username/password fields would just reset. I knew the password was correct because it had been saved within Firefox. When I tried to use the password reset too, that field would just reset too.</p>
<p>After talking to the script creator for awhile, we figured out that this issue was caused by my .htaccess file and he provided me with a much better method of using the 301 redirects.</p>
<p>This was my old method:</p>

<div class="wp_codebox"><table><tr id="p24611"><td class="code" id="p246code11"><pre class="text" style="font-family:monospace;">RewriteEngine on
Options +FollowSymLinks
RewriteCond %{THE_REQUEST} ^.*/index\.html
RewriteRule ^(.*)index.html$ http://www.bfxmedia.com/$1 [R=301]
RewriteCond %{THE_REQUEST} ^.*/index\.htm
RewriteRule ^(.*)index.htm$ http://www.bfxmedia.com/$1 [R=301]
RewriteCond %{THE_REQUEST} ^.*/index\.php
RewriteRule ^(.*)index.php$ http://www.bfxmedia.com/$1 [R=301]
RewriteCond %{THE_REQUEST} ^.*/index\.shtml
RewriteRule ^(.*)index.shtml$ http://www.bfxmedia.com/$1 [R=301]
RewriteCond %{THE_REQUEST} ^.*/index\.asp
RewriteRule ^(.*)index.asp$ http://www.bfxmedia.com/$1 [R=301]
RewriteCond %{THE_REQUEST} ^.*/index\.aspx
RewriteRule ^(.*)index.aspx$ http://www.bfxmedia.com/$1 [R=301]
RewriteCond %{THE_REQUEST} ^.*/index\.cfm
RewriteRule ^(.*)index.cfm$ http://www.bfxmedia.com/$1 [R=301]
RewriteCond %{THE_REQUEST} ^.*/index\.pl
RewriteRule ^(.*)index.pl$ http://www.bfxmedia.com/$1 [R=301]
RewriteCond %{THE_REQUEST} ^.*/default\.asp
RewriteRule ^(.*)default.asp$ http://www.bfxmedia.com/$1 [R=301]
RewriteCond %{THE_REQUEST} ^.*/default\.htm
RewriteRule ^(.*)default.htm$ http://www.bfxmedia.com/$1 [R=301]</pre></td></tr></table></div>

<p>Once we figured out the issue, he provided me with this:</p>

<div class="wp_codebox"><table><tr id="p24612"><td class="code" id="p246code12"><pre class="text" style="font-family:monospace;">RewriteCond %{THE_REQUEST} !/links/ [NC]
RewriteCond %{THE_REQUEST} ^.*/(index|default)\.(s?html?|php|aspx?|cfm|pl)
RewriteRule ^(.*)(index|default)\.(s?html?|php|aspx?|cfm|pl)$ http://www.bfxmedia.com/$1 [R=301,L]</pre></td></tr></table></div>

<p>He added the RewriteCond with the &#8220;links&#8221; directory and he condensed the line with all the file extensions down to one line. Now, I&#8217;ve got to change all my .htaccess files to this new streamlined version.</p>
<p>If you&#8217;re looking for a good (free) link trade script, you need to get <a href="http://linkex.dk/" target="_blank">LinkEX</a>.<br />
<a href="http://linkex.dk/" target="_blank"><img class="size-full wp-image-254" title="linkex" src="http://www.0092ff.com/wp-content/uploads/2008/09/linkex.gif" alt="LinkEX" width="222" height="83" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.0092ff.com/scripts/how-to-fix-linkex-and-htaccess-conflicts/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
