<?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>Web Cash &#187; blog</title>
	<atom:link href="http://www.earn-web-cash.com/tag/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.earn-web-cash.com</link>
	<description>Writing, Designing, and Making Money Online</description>
	<lastBuildDate>Sun, 04 Dec 2011 22:52:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Widget Bucks CPM Ads a Disappointing Waste of Time</title>
		<link>http://www.earn-web-cash.com/2008/02/27/widget-bucks-cpm-ads/</link>
		<comments>http://www.earn-web-cash.com/2008/02/27/widget-bucks-cpm-ads/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 23:52:09 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Advertising]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[earnings]]></category>
		<category><![CDATA[widget bucks]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/02/27/widget-bucks-cpm-ads/</guid>
		<description><![CDATA[Widget Bucks is a relatively new ad network. At first glance, they appear to be a great alternative to Ad Sense &#8211; attractive ads, competitive eCPM rates, and CPM payment for non-US visitors. After trying them out though, I found one aspect of their network &#8211; the CPM ads for foreign visitors &#8211; to be [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.widgetbucks.com/home.page?referrer=6126009' rel='nofollow'>Widget Bucks</a> is a relatively new ad network.  At first glance, they appear to be a great alternative to Ad Sense &#8211; attractive ads, competitive eCPM rates, and CPM payment for non-US visitors.</p>
<p>After trying them out though, I found one aspect of their network &#8211; the CPM ads for foreign visitors &#8211; to be entirely disappointing.<br />
<span id="more-162"></span></p>
<h4>What&#8217;s Good About Widget Bucks?</h4>
<p>At first glance, <a href='http://www.widgetbucks.com/home.page?referrer=6126009' rel='nofollow'>Widget Bucks</a> seems great.  The normal ads they serve &#8211; targeted product placement widgets &#8211; look terrific.  In my opinion they are light-years beyond the typical, ugly, AdSense text ad.</p>
<p>While these ads are only displayed to US and Canadian visitors, word is that the eCPM for the ads can be quite high.  If your site can successfully integrate the Widget Bucks ads &#8211; and most of your visitors are from North America &#8211; the ad network can be great.</p>
<h4>The Problem For Foreign Visitors</h4>
<p>I recently realized that this site has a large base of foreign visitors.  Roughly 1/3 of the visits come from North America &#8211; the rest are spread throughout the world, mainly Europe and Asia.  When I saw that Widget Bucks was advertising a fixed CPM rate for foreign visits, I thought it would be great.</p>
<p>They geo-target the ads for specific countries.  I thought this meant there would be targeted ads &#8211; for example, French ads for French visitors.  I also thought there would be a decent CPM &#8211; at the very least $1-2.</p>
<p>If that was the case, I&#8217;d gladly swap out the sub-par AdSense banner in my header for a banner Widget.</p>
<h4>If It&#8217;s Too Good To Be True&#8230;</h4>
<p>After testing out one of the Widget Bucks widgets and researching the topic a bit more, it turns out that for sites with a non-US visitors, Widget Bucks is a horrible service.</p>
<p>I was searching for some estimates on the CPM of these ads, when I came across <a href="http://www.everybodygoto.com/2007/12/16/widgetbucks-cpm-ads/">this description of the <strong>type</strong> of ads shown to non-US visitors</a>.</p>
<p>It turns out that Widget Bucks hasn&#8217;t got a real advertiser base for these visitors &#8211; so they&#8217;re serving up crappy ads like, &#8220;You&#8217;re the 999,999th visitor to this site!&#8221;  You know, the hideous ads that should have become extinct long ago.</p>
<p>One strike for Widget Bucks.</p>
<p>The author of that article also reported that he&#8217;d earned a whopping $0.01 for the impressions that he&#8217;d shown the Widget.  This prompted me to check my own earnings, and with 500 impressions yesterday, I&#8217;ve earned a whopping $0.01 as well.  Bleh.</p>
<h4>Check Back In a Few Months</h4>
<p>I still like the idea of <a href='http://www.widgetbucks.com/home.page?referrer=6126009' rel='nofollow'>Widget Bucks</a>, and I may check back in a few months.  Supposedly they&#8217;re working on building up a bigger base of advertisers, and it&#8217;s conceivable that this will improve both the type of ads and the payment for those ads.</p>
<p>At the moment, though, steer away from this service if you have a base of non-US visitors.  The regular Widgets look awesome, but you&#8217;ll be wasting your time displaying the CPM ads for mere pennies.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/02/27/widget-bucks-cpm-ads/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Avoid RevenueResponse &#8211; Possible Scam CPM Ad Program</title>
		<link>http://www.earn-web-cash.com/2008/02/15/revenueresponse-cpm-scam/</link>
		<comments>http://www.earn-web-cash.com/2008/02/15/revenueresponse-cpm-scam/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 16:22:14 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Advertising]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[ads]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[cpm]]></category>
		<category><![CDATA[earnings]]></category>
		<category><![CDATA[Payment]]></category>
		<category><![CDATA[scam]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/02/15/revenueresponse-cpm-scam/</guid>
		<description><![CDATA[Google AdSense could be a great way to monetize your site. But if you&#8217;re CTR or eCPM is in the crapper, you may be looking for a new solution &#8211; an ad network that pays a decent flat rate per thousand impressions. There are some reputable CPM programs out there (ValueClick seems to be among [...]]]></description>
			<content:encoded><![CDATA[<p>Google AdSense could be a great way to monetize your site.  But if you&#8217;re CTR or eCPM is in the crapper, you may be looking for a new solution &#8211; an ad network that pays a decent flat rate per thousand impressions.</p>
<p>There are some reputable CPM programs out there (<a href="http://www.valueclickmedia.com/Publishers.shtml">ValueClick</a> seems to be among the best), but there are surely plenty of scams out there.  I just read about one program &#8211; RevenueResponse &#8211; that seems like a site you should avoid using.<br />
<span id="more-113"></span></p>
<h5>What is RevenueResponse?</h5>
<p>I first read about RevenueResponse in a post on <a href="http://forums.digitalpoint.com/showthread.php?t=676401">DigitalPoint</a>.  Someone politely spammed the forum with his referral link while telling us about this great new CPM program.</p>
<p>Up front, the program seems fantastic.  They advertise a CPM rate of $5.  However, you read the fine print and it tells you you&#8217;ll earn <strong>up to</strong> $5 per thousand impressions.  There is also a click-through requirement &#8211; if you don&#8217;t meet a certain rate for a two week period, your account could get canned.</p>
<p>This is reasonable, though.  A guaranteed $5 CPM is fairly unrealistic, and any reputable advertising network will want to make sure the ads are displayed in a visible and click-able location.  But does the network pay?</p>
<h5>Proof of Payment from RevenueResponse?</h5>
<p>After a little searching on Google, I haven&#8217;t been able to find any instance of someone posting a proof of payment from RevenueResponse.  One person claimed they &#8220;always paid on time&#8221; &#8211; but his entire article was basically an ad spot for RevenueResponse.</p>
<p>If he&#8217;s trying to get you to click on his referral link, he&#8217;ll obviously claim that they make payment on time.</p>
<p>In the DigitalPoint discussion, someone posted a link to one claim that RevenueResponse is a scam.  This <a href="http://www.revenuesource.com/affiliate-program-announcements/13926-introducing-revenueresponse-com.html">fellow </a> claims he is owed $400+, that RevenueResponse kept delaying payment, and that he still hasn&#8217;t been paid.</p>
<p>I&#8217;m often skeptical of these scam stories.  People have posted stories about how PayPal cheated them out of money &#8211; but I&#8217;ve never had a bad experience with them.  However, without any confirmation of payment from another source I&#8217;m prepared to believe this guy and not waste my time with the Ad Network.</p>
<h5>Beware the Adware and Spyware</h5>
<p>Something else to beware of is that RevenueResponse (and other disreputable ad companies) may use your site to launch adware and spyware on your users&#8217; computers.</p>
<p>One user on DigitalPoint that signed up &#8211; but apparently didn&#8217;t earn enough to get payment &#8211; claims that the ad code launched some adware.  I don&#8217;t feel like signing up myself to verify this claim, but it&#8217;s another negative point for RevenueResponse.</p>
<p>Bottom line, this place doesn&#8217;t seem worth it.  They advertise ridiculously high rates &#8211; which means they either fall short or use underhanded means (like not paying publishers or installing adware on the users&#8217; computers) to make good.  If you&#8217;re looking for a CPM ad network, go with a reputable one.  Avoid this junk heap.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/02/15/revenueresponse-cpm-scam/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to Alternate CSS Styles Using PHP</title>
		<link>http://www.earn-web-cash.com/2008/02/13/alternate-css-styles-php/</link>
		<comments>http://www.earn-web-cash.com/2008/02/13/alternate-css-styles-php/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 04:08:08 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[HTML Tutorials]]></category>
		<category><![CDATA[PHP Tutorials]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/02/13/how-to-alternate-css-styles-using-php/</guid>
		<description><![CDATA[There are a lot of situations in which you'd like to alternate CSS styles from one element to the next.  Long tables, for example, look a lot nicer when the background color of the rows is alternated (think: Gmail).

How do we do that?  Some pretty simple PHP can help you accomplish this task and spice up your HTML/CSS.]]></description>
			<content:encoded><![CDATA[<p>There are a lot of situations in which you&#8217;d like to alternate CSS styles from one element to the next.  Long tables, for example, look a lot nicer when the background color of the rows is alternated.</p>
<p>How do we do that?  Some pretty simple PHP can help you accomplish this task and spice up your HTML/CSS.<br />
<span id="more-111"></span></p>
<h5>Look At the HTML/CSS</h5>
<p>Before we start making things dynamic, let&#8217;s look at the basic HTML.</p>
<p>Let&#8217;s say we want to make a list of items &#8211; in a table &#8211; maybe a list of emails.  The end result should be a table with alternating background colors for rows &#8211; white and light blue.</p>
<p>If we were to create this table by hand, it might look something like this.</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;">table</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;blue&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>E-mail subject<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Sender<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;white&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>E-mail subject<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Sender<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">table</span>&gt;</span></pre></div></div>

<p>This assumes that we have a CSS class defined as &#8220;blue&#8221; with a blue background and &#8220;white&#8221; with a white background.</p>
<h5>Adding Some PHP to Assign Classes</h5>
<p>We&#8217;re setting the background color by adding a class declaration to the table row.  The first step in making this dynamic is to use PHP to echo the class.  Like this&#8230;</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;">tr</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo 'blue'; ?&gt;</span></span>&quot;&gt;<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span> ... <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span></pre></div></div>

<p>We&#8217;ve taken the same table row element from before and replaced &#8220;blue&#8221; with a php snippet that echos the same phrase, &#8220;blue.&#8221;  The end result is the same HTML that we created in the first example.</p>
<h5>Dynamically Choosing the Class</h5>
<p>The final step in making this dynamic is to add a conditional statement to the PHP block.  For example, let&#8217;s say we&#8217;re executing a loop 5 times.  On the odd iterations (1, 3, 5) we&#8217;ll use &#8220;blue&#8221; as the class.  On the even iterations (2, 4), we&#8217;ll use &#8220;white.&#8221;</p>
<p>To test whether or not a number is odd, you can use the modulus (%) operator.  This returns the remainder of a division &#8211; so <code>2 % 3 = 1</code>.  With a little basic math theory, we know that if a number is divided by 2 and has no remainder it&#8217;s even &#8211; but if there&#8217;s a remainder of 1 it&#8217;s odd.</p>
<p>Here&#8217;s what the loop might look like.</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;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #000088;">$x</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">6</span><span style="color: #339933;">;</span> <span style="color: #000088;">$x</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
   &lt;tr class=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span> <span style="color: #339933;">%</span> <span style="color: #cc66cc;">2</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;blue&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
      <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;white&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
      <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;&lt;td&gt; ... &lt;/td&gt;&lt;/tr&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h5>That If Statement Is Kind of Long&#8230;</h5>
<p>Well, we can shorten that up.  This is a great place to use the obscure and un-readable ternary operator in PHP.  It&#8217;s a shortcut that allows you to write a simple if-statement in one line.</p>
<p>For example&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span> ? <span style="color: #0000ff;">&quot;Yes&quot;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;No&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The ternary operator takes three parts &#8211; the conditional statement (in this case I just wrote true), a value to return if the statement is true (&#8220;Yes&#8221;), and a value to return if the statement is false (&#8220;No&#8221;).  I echo&#8217;ed the result just so you could see what the statement outputs (in this case, &#8220;Yes&#8221;).</p>
<p>We turn our previous if statement into a ternary operator statement and shorten up that code block quite a bit.  Like so&#8230;</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;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #000088;">$x</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">6</span><span style="color: #339933;">;</span> <span style="color: #000088;">$x</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
   &lt;tr class=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span> <span style="color: #339933;">%</span> <span style="color: #cc66cc;">2</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span> ? <span style="color: #0000ff;">&quot;blue&quot;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;white&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;&lt;td&gt; ... &lt;/td&gt;&lt;/tr&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Creating these table rows is just one example of how you can use PHP to help spice up your HTML.  With this concept, you can dynamically alternate styles based on a bunch of factors.</p>
<p>How else could you use this?</p>
<p>You could alternate the background colors of comments in your blog template.  You could include a bottom-border after every five rows in your table.  You could make a calendar module and display Saturday and Sunday in boldface.</p>
<p>The options are really endless &#8211; so long as you understand the basic principal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/02/13/alternate-css-styles-php/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Use Xomba.com to Generate Backlinks for SEO</title>
		<link>http://www.earn-web-cash.com/2008/02/11/xomba-backlinks-seo/</link>
		<comments>http://www.earn-web-cash.com/2008/02/11/xomba-backlinks-seo/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 03:22:17 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Traffic]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[backlink]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[xomba]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/02/11/xomba-backlinks-seo/</guid>
		<description><![CDATA[Here's another quick tip for creating targeted, dofollow backlinks - write Xomblurbs and Xombytes at Xomba.com.

What is Xomba.com?  It's just another site you can write for on the 'net - and get a share of the revenue through your AdSense account.  This makes it ripe for writing short articles that feature your own website - full of targetted backlinks.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another quick tip for creating targeted, dofollow backlinks &#8211; write Xomblurbs and Xombytes at Xomba.com.</p>
<p>What is Xomba.com?  It&#8217;s just another site you can write for on the &#8216;net &#8211; and get a share of the revenue through your AdSense account.  This makes it ripe for writing short articles that feature your own website &#8211; full of targetted backlinks.<br />
<span id="more-110"></span><br />
There are two types of articles on Xomba &#8211; Xombytes and Xomblurbs.</p>
<p>Xombytes are typical articles.  They should be a couple hundred words (or more).  If I write a Xombyte about one of my websites, I use the same tactic that I use on Associated Content &#8211; I write an overview of a topic and include links to two or three of my own articles.  For optimal SEO, I usually try to sneak in a link to my front page as well on a targeted keyword like &#8220;PHP,&#8221; &#8220;programming,&#8221; or &#8220;web design.&#8221;</p>
<p>Xomblurbs are even simpler.  They seem ripe for backlink generation.  They&#8217;re essentially social bookmarking articles &#8211; you submit a link and a short description.  That description can contain html.</p>
<p>So in a Xomblurb I write a short title, add the link to my own article, write a two sentence intro, and then end with something like &#8220;This is one of many web design and traffic improvement articles located at the site.&#8221;  In the last sentence, I link to two of the categories on my blog.</p>
<p>Although I only write a couple of sentences, I can quickly generate three backlinks to my site &#8211; two with nicely targeted keywords that are good for SEO.</p>
<p>There&#8217;s probably not a whole lot of PR in these pages, but it&#8217;s a ridiculously simple and easy way to generate backlinks to your site.  I&#8217;m going through and writing one or two Xomblurbs a day on my old articles, and I plan on posting most of my new articles there as well.  Seems well worth the investment in time for a bit of SEO.</p>
<p>Here&#8217;s a <a href="http://www.xomba.com/tip_to_increase_traffic_to_blogs_articles" rel="nofollow">sample Xomblurb</a> if you want to check it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/02/11/xomba-backlinks-seo/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Selling Text Link Ads &#8211; TNX.net</title>
		<link>http://www.earn-web-cash.com/2008/02/08/tnx-text-links/</link>
		<comments>http://www.earn-web-cash.com/2008/02/08/tnx-text-links/#comments</comments>
		<pubDate>Sat, 09 Feb 2008 03:32:05 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Advertising]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[ads]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[earn]]></category>
		<category><![CDATA[links]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/02/08/tnx-text-links/</guid>
		<description><![CDATA[Although Google Adsense is easy and convenient, it isn&#8217;t always the best choice for monetization. My click-through rate and eCPM is relatively low &#8211; but there are other methods to turn traffic into cash. One method is to sell text link ads. A major ad group on this front is Text-Link-Ads. However, while I&#8217;m building [...]]]></description>
			<content:encoded><![CDATA[<p>Although Google Adsense is easy and convenient, it isn&#8217;t always the best choice for monetization.  My click-through rate and eCPM is relatively low &#8211; but there are other methods to turn traffic into cash.</p>
<p>One method is to sell text link ads.  A major ad group on this front is <a href="http://www.text-link-ads.com/">Text-Link-Ads</a>.  However, while I&#8217;m building up my pagerank, I decided to test out a different provider &#8211; <a href="http://www.tnx.net" rel="nofollow">TNX</a>.<br />
<span id="more-104"></span><br />
The site works a little differently from Text-Link-Ads.  Instead of selling a block of ads, you get to select from a list of pre-approved links and add them to your site.</p>
<p>The way I have it set up, a cached list of links is generated on my server.  A snippet of PHP then accesses the cache and inserts the individual links where I want them to go.</p>
<p>I can add up to four links on each individual page.  They can be bunched up in a list or spread out a bit.  It doesn&#8217;t seem to effect the payment where the links are placed &#8211; as long as they aren&#8217;t obfuscated and hidden (which is a violation of ToS).</p>
<p>How much can you make?  Well, that waits to be seen.</p>
<p>TNX uses a points trading system.  An advertiser offers to pay for a certain type of site &#8211; based on # of links and pagerank &#8211; and offers to pay a certain number of points.  When you accept that publisher, you&#8217;re paid the points for one month.  You can then either spend those points on your own advertisements or trade them in for cash.</p>
<p>Currently, the points are worth about $0.75 per 1000 points.  When you look at your list of pages, it tells you how many points a link is worth.  For my new site, which is still officially pagerank 0 and has about 350 Yahoo backlinks, the going rate is 3 points.  Not a whole lot.</p>
<p>With about 120 pages of content, I could place approximately 1400 links on my site (at four links per page).  That would yield about $1.00-$1.25 per month.  Hmm&#8230; not a lot.</p>
<p>Of course, I realize my site&#8217;s page rank and stats haven&#8217;t climbed to the point that it will attract real advertising revenue.  I added links to a few pages, just to check out the system, but I plan on waiting and seeing how the price changes as my backlinks increase.</p>
<p>In general, text link ads are a great way to add a steady stream of revenue.  They&#8217;re more stable and predictable than AdSense &#8211; and they can be a boon if your site typically has a low click-through rate.  I&#8217;ve seen people with successful sites earn $500+ per month with a block of text links.</p>
<p>I&#8217;ll post again in a few weeks to report on any changes with <a href="http://www.tnx.net" rel="nofollow">TNX</a>.  At the moment, I&#8217;m not terribly impressed with the potential &#8211; but it may improve drastically with pagerank and backlinks.  Who knows.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/02/08/tnx-text-links/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Submit Graphics Tutorials to GimpTutorials.com for Traffic</title>
		<link>http://www.earn-web-cash.com/2008/02/01/gimp-tutorials/</link>
		<comments>http://www.earn-web-cash.com/2008/02/01/gimp-tutorials/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 23:09:10 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Redirected]]></category>
		<category><![CDATA[Traffic]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/02/01/gimp-tutorials/</guid>
		<description><![CDATA[If you write tutorials on your website or blog, then niche tutorial directories are a great source of traffic.  I list most of my php tutorials with good-tutorials and get a nice <a href="http://www.earn-web-cash.com/2008/01/18/good-tutorialscom-niche-article-sites-to-help-increase-traffic/">burst of traffic</a> with each new listing.

Another site I've found useful is <a href="http://www.gimp-tutorials.com" title="Gimp Tutorial Site">Gimp Tutorials</a>.  They're a great place to list any graphics tutorials that you write for the GIMP graphic design program.]]></description>
			<content:encoded><![CDATA[<p>If you write tutorials on your website or blog, then niche tutorial directories are a great source of traffic.  I list most of my php tutorials with good-tutorials and get a nice <a href="http://www.earn-web-cash.com/2008/01/18/good-tutorialscom-niche-article-sites-to-help-increase-traffic/">burst of traffic</a> with each new listing.</p>
<p>Another site I&#8217;ve found useful is <a href="http://www.gimp-tutorials.com" title="Gimp Tutorial Site">Gimp Tutorials</a>.  They&#8217;re a great place to list any graphics tutorials that you write for the GIMP graphic design program.<br />
<span id="more-92"></span><br />
In case you don&#8217;t know what GIMP is, head to the <a href="http://www.gimp.org/" title="Gimp Homepage">Gimp</a> homepage.  It&#8217;s a free, open source graphic editing suite &#8211; similar in many ways to the expensive, proprietary Adobe Photoshop.</p>
<p><a href="http://www.gimp-tutorials.com" title="Gimp Tutorial Site">Gimp Tutorials</a> is another niche directory where you can submit appropriate tutorials for listing.  In this case, appropriate means just about anything related to creating or editing an image in Gimp.</p>
<p><a href='http://www.earn-web-cash.com/wp-content/uploads/2008/02/gimp-tutorials-analytics.png' title='Screenshot of Analytics Data for Referrals from Gimp Tutorials'><img class="alignright" src='http://www.earn-web-cash.com/wp-content/uploads/2008/02/gimp-tutorials-analytics.thumbnail.png' alt='Screenshot of Analytics Data for Referrals from Gimp Tutorials' /></a>I wrote a very basic tutorial to show users <a href="http://www.earn-web-cash.com/2008/01/24/how-to-create-a-gradient-background-image-in-gimp/" title="GIMP Gradient Image Tutorial">how to create a gradient background image in GIMP</a>.  Since I submitted the tutorial to Gimp Tutorials, slightly less than week ago, they&#8217;ve sent me 200 visits.</p>
<p>There was a brief spike on the first day, and I&#8217;ve been getting a steady stream of 20-30 visitors each day after that.</p>
<p>There doesn&#8217;t appear to be a lot of turnover on the site, so my tutorial is still listed third on the front page.  That&#8217;s after five days.  That&#8217;s a pretty lengthy period of exposure &#8211; considering that others sites (like Good Tutorials) turnover in about a day.</p>
<p>So if you write any tutorials for GIMP, don&#8217;t hesitate to submit them here.  It&#8217;s a good way to drive a few extra users to your latest article.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/02/01/gimp-tutorials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Huzzah Akismet!  Blocking Spam Comments All Day</title>
		<link>http://www.earn-web-cash.com/2008/01/29/akismet-spam/</link>
		<comments>http://www.earn-web-cash.com/2008/01/29/akismet-spam/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 03:39:21 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Online Tools]]></category>
		<category><![CDATA[Sundry Musings]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[trackback]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/01/29/huzzah-akismet-blocking-spam-comments-all-day/</guid>
		<description><![CDATA[You know your site is finally getting around a bit when you start getting comments.  Spam comments.

I started a (now defunct) website last year, powered by <a href="http://www.wordpress.org">Wordpress</a>.  It never got too popular, and in the beginning I was excited every time I got a "New Comment" or "New Trackback" e-mail.  Then I realized they were mostly all spam.]]></description>
			<content:encoded><![CDATA[<p>You know your site is finally getting around a bit when you start getting comments.  Spam comments.</p>
<p>I started a (now defunct) website last year, powered by <a href="http://www.wordpress.org">WordPress</a>.  It never got too popular, and in the beginning I was excited every time I got a &#8220;New Comment&#8221; or &#8220;New Trackback&#8221; e-mail.  Then I realized they were mostly all spam.<br />
<span id="more-86"></span><br />
A few minutes ago, I checked my e-mail and had a spam comment in my inbox.  I thought, &#8220;Ahh, here comes the spam.&#8221;</p>
<p>When I logged into the dashboard, I spammed the comment and was about to move away.  Then I happened to look at the dashboard again &#8211; and I remembered that I had set up Akismet this time around.</p>
<p>I just added the widget to the left sidebar because I was so impressed.  Akismet apparently blocked 84 spam comments &#8211; and this was the first one that got through.  I&#8217;d say that&#8217;s pretty impressive.</p>
<p>If you&#8217;re running a WordPress blog, or something else that uses comments and can utilize an Akismet plug-in, <strong>do so</strong>.  There&#8217;s nothing more frustrating than wading through spam comments and trackbacks all day long.</p>
<p>Akismet is apparently pretty effective at cutting them down.  A few of them might sift through, but you can never get rid of <strong>all</strong> the spam.  So be happy if you can eliminate 84/85.</p>
<p>You can download the <a href="http://codex.wordpress.org/Akismet">Akismet plugin for WordPress</a>, but all new builds come with Akismet pre-installed.  All you have to do is fill in the Akismet API number &#8211; which you can get for free with a WordPress account.</p>
<p>Happy spam-free comment logs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/01/29/akismet-spam/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What&#8217;s the Best Choice, Combination, and Placement of Adsense Ads?</title>
		<link>http://www.earn-web-cash.com/2008/01/29/adsense-trends/</link>
		<comments>http://www.earn-web-cash.com/2008/01/29/adsense-trends/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 21:40:56 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Advertising]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[ads]]></category>
		<category><![CDATA[AdSense]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[earnings]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/01/29/adsense-trends/</guid>
		<description><![CDATA[<p>If you operate a website (like this blog), Google Adsense is probably one of your main streams of revenue.  Although you may eventually outgrow Adsense, chances are you'll have used it at some point.</p>

<p>While looking through my Adsense stats, I noticed an odd trend.  This trend suggested a few things about monetizing a site through Adsense - questions that I don't have an answer for yet, but that I will be looking for.</p>]]></description>
			<content:encoded><![CDATA[<div class="alignright"><script type="text/javascript"><!--
google_ad_client = "pub-2399151883698113";
//125x125 Adsense Referral Button
google_ad_slot = "1937689390";
google_ad_width = 125;
google_ad_height = 125;
google_cpa_choice = ""; // on file
//--></script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<p>If you operate a website (like this blog), Google Adsense is probably one of your main streams of revenue.  Although you may eventually outgrow Adsense, chances are you&#8217;ll have used it at some point.</p>
<p>While looking through my Adsense stats, I noticed an odd trend.  This trend suggested a few things about monetizing a site through Adsense &#8211; questions that I don&#8217;t have an answer for yet, but that I will be looking for.</p>
<p><span id="more-85"></span></p>
<p>On this and my other site (<a href="http://www.teachbabel.com" title="Babel - Bringing Teachers Together">Babel</a>), I use a few main types of ads &#8211; a horizontal image banner, a skyscraper with text and images, and square boxes with text and images.</p>
<p>It&#8217;s natural to wonder, &#8220;Which ad is the most efficient and most effective?&#8221;</p>
<p>Both of these sites are relatively new, so I don&#8217;t have a lot of data to work with.  From the data that I do have, though, I&#8217;ve noticed a few key trends.</p>
<ul>
<li>The tall vertical skyscraper and the square blocks seem to have the best click-through rate</li>
<li>The horizontal image banner (like the one in the header) seems to have a low click-through rate</li>
<li>The tall vertical skyscraper and the square blocks seem to have lower pay-per-click values</li>
<li>The horizontal image banner seems to have a much higher payout than the other two options</li>
</ul>
<p>Like I said, I don&#8217;t have a whole lot of data to support these trends at the moment.  Over the next month or two, I plan on watching these trends and testing them out (using random tests of text verse image ads).</p>
<p>It&#8217;s something to keep in mind, though.  The horizontal image banner seems to be the most effective &#8211; the high payout makes up for the low click-through rate.  Although I wouldn&#8217;t get rid of the other ads, it&#8217;s a good justification for making sure you have at least one horizontal image banner on your site.</p>
<p>Notice any trends in your own Adsense reports?  I&#8217;d be interested to hear what other people have come up.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/01/29/adsense-trends/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Five Non-Traditional Ways to Use Tooltips</title>
		<link>http://www.earn-web-cash.com/2008/01/20/five-ways-tooltips/</link>
		<comments>http://www.earn-web-cash.com/2008/01/20/five-ways-tooltips/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 12:01:53 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Sundry Musings]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[anchor]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[tooltip]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/01/20/five-ways-tooltips/</guid>
		<description><![CDATA[In standard HTML, tooltips seem to be reserved for anchor tags &#8211; i.e. links. They get the all-powerful &#8220;title&#8221; attribute which is turned into a tooltip. There are plenty of other times that you&#8217;d want to use a tooltip, though. If you&#8217;re wondering how, check out this previous post on how to create a custom [...]]]></description>
			<content:encoded><![CDATA[<p>In standard HTML, tooltips seem to be reserved for anchor tags &#8211; i.e. links.  They get the all-powerful &#8220;title&#8221; attribute which is turned into a tooltip.</p>
<p>There are plenty of other times that you&#8217;d want to use a tooltip, though.  If you&#8217;re wondering how, check out this previous post on <a href="http://www.earn-web-cash.com/2008/01/19/create-css-tooltips/">how to create a custom tooltip with css</a>.</p>
<p>Otherwise, read on for some thoughts on <em>when</em> to use these tooltips.<br />
<span id="more-47"></span></p>
<h5>5. Definitions of Words</h5>
<p>One interesting way to use custom tooltips is to show the definition of a word.  This would be great for educational sites that aim to teach their users about a given subject.  Rather than link to a new page with information on a word, just include a brief explanation in a tooltip.</p>
<p>Likewise, this could be used on coding tutorial sites to pop-up information on built-in functions and such.  Hmm&#8230; do I smell a useful WordPress plug-in?</p>
<h5>4. Movie/Book/Television Spoilers</h5>
<p>Do you write about movies, books, or tv shows?  Well, I don&#8217;t.  But if you did&#8230; you might want to share spoilers and other information with your users.</p>
<p>The problem is that not all users <em>want</em> to have the ending spoiled for them.  I saw a similar thing used in a forum &#8211; all spoilers had to be wrapped in a bb-code tag that made them invisible until you moused-over them.</p>
<p>This way users can choose whether or not to learn the ending of the story.  If you leave it out on the screen, they might read it by accident and blame you for ruining the whole thing.</p>
<h5>3. Citations and Source Quotes</h5>
<p>Do you find yourself quoting other sources often?  Maybe your blog is a bit on the literary or academic side?</p>
<p>You could use these tooltips to contain footnoting and citation information.  Rather than clicking a link to go to the bottom of the screen (i.e. Wikipedia style), have the information pop-up on a tooltip.</p>
<p>I know that when I&#8217;m reading a book I&#8217;m far more likely to pay attention to footnotes that are on the same page than footnotes at the end of the chapter or book.  Convenience is key.</p>
<h5>2.  Puzzle or Logic Game Tips</h5>
<p>Do you have some kind of puzzle, quiz, or game on your website?  People love a challenge&#8230; but they hate a game that&#8217;s too hard.</p>
<p>The solution, of course, is to offer the user hints.  These can&#8217;t be readily visible, though, or it&#8217;ll spoil the game.</p>
<p>With the tooltip, the user can easily mouse-over some text that says &#8220;First Tip,&#8221; to get a little hint without opening up a new window.  Convenient indeed.</p>
<h5>1.  Instructions and Information for Forms</h5>
<p>I&#8217;m not a big fan of extra text hanging out on a form telling a user what to do.  It seems to get in the way and detract from the look of the form.</p>
<p>Instead, use a tooltip over the label (or add a &#8220;?&#8221; for the tooltip) to tell the user what to enter in a field.  That way you can include lots of information &#8211; so much that you might find it to be over-simplifying &#8211; and the user won&#8217;t have to read this &#8220;help&#8221; unless they actually need it.</p>
<p>You help the confused users without turning off the savvy ones.</p>
<h5>What Else?</h5>
<p>I&#8217;m sure there are dozens of other ways to use custom tooltips.  Got some ideas?</p>
<p>Then leave a comment.  I&#8217;d love to hear how you&#8217;d use them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/01/20/five-ways-tooltips/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Write a PHP Script to Send a Trackback</title>
		<link>http://www.earn-web-cash.com/2008/01/08/how-to-write-a-php-script-to-send-a-trackback/</link>
		<comments>http://www.earn-web-cash.com/2008/01/08/how-to-write-a-php-script-to-send-a-trackback/#comments</comments>
		<pubDate>Wed, 09 Jan 2008 01:42:13 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[PHP Tutorials]]></category>
		<category><![CDATA[Redirected]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[trackback]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/01/08/how-to-write-a-php-script-to-send-a-trackback/</guid>
		<description><![CDATA[Don&#8217;t know what a trackback is? Check out this set of articles for a bit more information. Assuming you do know what a trackback is, how do you send one &#8211; technically speaking? And how can we write a php script to send one? A trackback is a simple ping &#8211; an HTTP Request. It [...]]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t know what a trackback is?  Check out this <a href="http://www.earn-web-cash.com/web-design-guides/trackbacks/">set of articles</a> for a bit more information.</p>
<p>Assuming you do know what a trackback is, how do you send one &#8211; technically speaking?  And how can we write a php script to send one?</p>
<p>A trackback is a simple ping &#8211; an HTTP Request.  It is specially formatted with a limited amount of information.  The receiving server is set up to handle that information and use it to create the comment based on your trackback ping.<br />
<span id="more-29"></span></p>
<h5>The Trackback API As Per Moveable Type</h5>
<p>Since Moveable Type introduced the trackback, they were the ones responsible for writing the standards and API.  You can read through the <a href="http://www.sixapart.com/pronet/docs/trackback_spec">trackback technical specs on the SixApart website.</a></p>
<p>In order to send a trackback ping with a PHP script, there&#8217;s a few things we need to know&#8230;</p>
<ul>
<li>The ping is in the form of an HTTP Post Request.</li>
<li>The ping is sent to the trackback URI of the receiving post.</li>
<li>The request must have a content-type header defining it as <code>application/x-www-url-encoded</code></li>
<li>All of the parameters included in the content should be url encoded.</li>
<li>The standard parameters are &#8220;title,&#8221; &#8220;excerpt,&#8221; &#8220;url,&#8221; and &#8220;blog.&#8221;  Only the &#8220;url&#8221; parameter is required.</li>
<li>The server will send a short XML response &#8211; containing <code>&lt;error&gt;0&lt;/error&gt;</code> if there was no error, and <code>&lt;error&gt;1&lt;/error&gt;</code> along with a <code>&lt;message&gt;&lt;/message&gt;</code> element if there was an error.</li>
</ul>
<p>With that in mind, we can begin to write our script.  We need to do four things.</p>
<ul>
<li>Receive input from the user (the blog url, title, excerpt, etc).</li>
<li>Create the header and format the information correctly</li>
<li>Send the header and get a response</li>
<li>Read the XML to see if it was successful or not</li>
</ul>
<h5>Getting Input From the User</h5>
<p>Getting input is pretty simple.  We&#8217;ll create a form in HTML, set the action to the page containing the script, and set the method to post.</p>
<p>You&#8217;ll want a text input for the URL, title, and blog.  You could use either a text input or a small textarea box to take the excerpt.</p>
<p>Here&#8217;s some sample HTML to create the form.  You&#8217;d want to add some css to make it look pretty, but you can do that some other time.</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;">form</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;trackback-form&quot;</span> <span style="color: #000066;">method</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">action</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;trackback.html&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">fieldset</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;trackback&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;trackback-uri&quot;</span>&gt;</span>Trackback URI:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;trackback-uri&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;trackback-uri&quot;</span> </span>
<span style="color: #009900;">        <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;title&quot;</span>&gt;</span>Post Title:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;title&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;title&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;url&quot;</span>&gt;</span>Post URL:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;url&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;url&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;excerpt&quot;</span>&gt;</span>Excerpt:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;excerpt&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;excerpt&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;blog&quot;</span>&gt;</span>Blog Name:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;blog&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;blog&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Send Trackback Ping&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> </span>
<span style="color: #009900;">        <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span> <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">fieldset</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span>');</pre></div></div>

<p>Simple&#8230; but effective.  Set the &#8220;action&#8221; to the name of the file with the form in it.  We&#8217;ll add the php script to the top, and the form will just return the information to itself.</p>
<h5>Reading the Information from the Form and Encoding It</h5>
<p>Once you hit submit, all of the form information will get sent to the file so that the script &#8211; at the beginning of the file &#8211; can handle it.</p>
<p>All of this form information is in the $_POST array.  The &#8216;key&#8217; for each element is the &#8216;name&#8217; attribute of the form element.</p>
<p>We&#8217;ll also need to use the urlencode() function.  This takes the input and escapes any special characters (like spaces) so that the input is in the proper format.</p>
<p>Here&#8217;s a snippet to read the $_POST variables, encode them, and store the information in some new variables.  Note that you&#8217;d probably want to include some error checking (i.e. check to see if the $_POST[] element is empty, and set an error message if it is).  I&#8217;ll leave that up to you.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <span style="color: #990000;">urlencode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #990000;">urlencode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$excerpt</span> <span style="color: #339933;">=</span> <span style="color: #990000;">urlencode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'excerpt'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$blog_name</span> <span style="color: #339933;">=</span> <span style="color: #990000;">urlencode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'blog'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$trackback_uri</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'trackback-uri'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now that have all of our information, we need to create the HTTP header.  </p>
<p>You could format this as a special string, but php has a built in function &#8211; stream_context_create &#8211; that will take a formatted array and use it to send an HTTP header.  That&#8217;s what we&#8217;ll be using.</p>
<p>A HTTP header looks something like this&#8230;<br />
<code>
<pre>
POST http://targeturl.com
Content-Type: application/x-www-form-urlencoded; charset=utf-8

paramvar=Param+Value&#038;paramvar2=Param+Value+2
</pre>
<p></code></p>
<p>In order to use stream_context_create, we need to create an array in the following format.</p>
<ul>
<li><code>$params['http']['method']</code> is the method (POST)</li>
<li><code>$params['http']['header']</code> is the optional headers (in this case the Content-Type)</li>
<li><code>$params['http']['content']</code> is the actual content &#8211; the parameter variables and values.  This will be the string containing all of the trackback information (the post url, post title, blog name, and excerpt).</li>
</ul>
<p>So, to create the array we need, here&#8217;s a short snippet of code, picking up where we left off before&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'http'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'method'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'POST'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'http'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'header'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Content-Type: 
    application/x-www-form-urlencoded'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'http'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'content'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;title=<span style="color: #006699; font-weight: bold;">$title</span>&amp;url=<span style="color: #006699; font-weight: bold;">$url</span>&amp;
    blog_name=<span style="color: #006699; font-weight: bold;">$blog_name</span>&amp;excerpt=<span style="color: #006699; font-weight: bold;">$excerpt</span>&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Note that because we used double-quotes (&#8221; &#8220;) when declaring <code>$params['http']['content']</code>, we could simply include the variables in the string &#8211; and PHP will punch in the values for us.</p>
<h5>Send the Header!  Pings Away!</h5>
<p>Now that we&#8217;ve created the array, we&#8217;re ready to create a context and actually send the HTTP request to the target website.</p>
<p>Like I said before, we&#8217;ll use the function <code>stream_context_create</code> to do the work.  Then we&#8217;ll fopen the target, write the header, fclose the target, and save the response.</p>
<p><code>stream_context_create</code> just needs one parameter &#8211; our formatted array.</p>
<p><code>fopen</code> will take a few parameters &#8211; the target URL ($trackback_uri), the mode (&#8216;rb&#8217; for read-only, binary), a boolean option which is false for us, and the context we created with <code>stream_context_create</code>.</p>
<p>Here&#8217;s the actual code snippet.  (Note:  You can only use a context in <code>fopen()</code> in PHP 5 or greater.  You&#8217;ll need to manually make the header if you&#8217;re using PHP 4)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//  Create the context from the formatted array</span>
<span style="color: #000088;">$context</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stream_context_create</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$params</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//  Open a stream to the url, save it in the pointer $fp</span>
<span style="color: #000088;">$fp</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$trackback_uri</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'rb'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000088;">$context</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//  Send the header and get the results, saved in $response</span>
<span style="color: #000088;">$response</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #990000;">stream_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//  Always close for good measure</span>
<span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>At this point, you should be able to send trackbacks just fine.</p>
<h5>Read the Result Message &#8211; Error or No?</h5>
<p>Now we need to read the results (saved in $response) and find out if we were successful.</p>
<p>You could just echo it.  The xml tags will be hidden by the browser, so the user will just see the output.  However I like to have the script read it so that I can output a customized message.</p>
<p>One way to do this would be to build an xml parser and find out directly what&#8217;s in the <code>&lt;error&gt;&lt;/error&gt;</code> element.  This is a lot of work for one error message, though.</p>
<p>Instead, we can use our knowledge of the standard format of the message to good use.</p>
<p>First, we know that a success is always returned with <code>&lt;error&gt;0&lt;/error&gt;</code>.  If we do a stripos or substr search to see if that string is included in $response, we&#8217;ll know if the test was successful or not.</p>
<p>Then, we can isolate the <code>&lt;message&gt;&lt;/message&gt;</code> element and echo that.</p>
<p>Here&#8217;s the code I used to do it.  Not sure if it&#8217;s the most efficient way to do it, but it works&#8230; so why not?</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//  If this is true, there was no error</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">stripos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;error&gt;0&lt;/error&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #000088;">$outcome</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;All clear! Trackback 
        was sent successfully.&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">else</span>
    <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">//  Find the beginning and end of the message element</span>
    <span style="color: #000088;">$start_resp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stripos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;message&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$end_resp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stripos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;/message&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//  substr will return the actual message element, </span>
    <span style="color: #666666; font-style: italic;">//    with the tags included</span>
    <span style="color: #000088;">$outcome</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span><span style="color: #339933;">,</span> <span style="color: #000088;">$start_resp</span><span style="color: #339933;">,</span> 
        <span style="color: #000088;">$end_resp</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$start_resp</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: #666666; font-style: italic;">//  Replace the tags with blank space</span>
    <span style="color: #000088;">$outcome</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;message&gt;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$outcome</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$outcome</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;/message&gt;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$outcome</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$outcome</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Error: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$outcome</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//  Echo the results.  I formatted 'error' to be red.</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;p class='error&gt;<span style="color: #006699; font-weight: bold;">$outcome</span>&lt;/p&gt;&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<h5>Recap</h5>
<p>Well, there you have it.  Put all that code together and you should have a functioning example.</p>
<p>Of course, instead of building your own script, you could simply use the <a href="http://www.earn-web-cash.com/online-tools-design/trackback/">form I already created</a> to do this.  Or you could head over there to see how it works.</p>
<p>This is a pretty good learning activity, though.  You get to see how contexts and streams work, sending an HTTP header to get a response.</p>
<p>We also make use of the <code>urlencode()</code> function and use <code>stripos()</code> and <code>substr()</code> to do some half-assed xml parsing.  You could use a similar method for reading HTML and parsing tags.</p>
<p>Enjoy, and be sure to leave a comment if there&#8217;s something else you&#8217;d like to see explained in a tutorial.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/01/08/how-to-write-a-php-script-to-send-a-trackback/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>

