<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3" -->
<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/"
	>

<channel>
	<title>Meta Titan</title>
	<link>http://www.metatitan.com</link>
	<description>Knowledge to help you build good websites</description>
	<pubDate>Thu, 03 Jan 2008 20:27:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3</generator>
	<language>en</language>
			<item>
		<title>Classes vs IDs, CSS Practice</title>
		<link>http://www.metatitan.com/css/22/classes-vs-ids-css-practice.html</link>
		<comments>http://www.metatitan.com/css/22/classes-vs-ids-css-practice.html#comments</comments>
		<pubDate>Thu, 03 Jan 2008 20:22:29 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.metatitan.com/misc/22/classes-vs-ids-css-practice.html</guid>
		<description><![CDATA[A good use of classes and IDs can save you a lot of time. You&#8217;ll end up with a site that&#8217;s easy to maintain, and frankly, your code will look a lot cleaner. There are certain rules and practices when using classes and IDs, the following guide looks over them.
First off, what defines an ID [...]]]></description>
			<content:encoded><![CDATA[<p>A good use of classes and IDs can save you a lot of time. You&#8217;ll end up with a site that&#8217;s easy to maintain, and frankly, your code will look a lot cleaner. There are certain rules and practices when using classes and IDs, the following guide looks over them.</p>
<p>First off, what defines an ID and a class? Simply put, an ID is a unique identifier and should only be used once in your document. It&#8217;s good practice to use ID on structural blocks of your site such as a wrapper, header, footer, navigation bar, etc. A class can be used more broadly to define objects that can appear multiple times in your document, such as link styling, tables, etc.</p>
<p><strong>Example usage of an ID:</strong></p>
<p>In your html code:<br />
&lt;div id=&#8221;mainWrapper&#8221;&gt;content&lt;/div&gt;</p>
<p>In your stylesheet:<br />
div#mainWrapper { margin: 10px 30px; }</p>
<p><strong>Example usage of a Class:</strong></p>
<p>In your html code:<br />
&lt;span class=&#8221;test&#8221;&gt;Hello, World&lt;/span&gt;</p>
<p>In your stylesheet:<br />
span.test { color: #003366; font-weight: 900; } </p>
<p>When naming your classes and IDs, try and use generic and easy to identify names. For example, instead of calling something &#8220;yellowBar&#8221; try &#8220;topSidebar&#8221;. Who knows what color that bar will be 6 months from now! Also, pick a naming style that you&#8217;re comfortable with and stick to it - either lowercase (#helloworld) or camel case (#helloWorld) - you should never use spacing in names.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metatitan.com/css/22/classes-vs-ids-css-practice.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>How to Calculate PHP Load Times</title>
		<link>http://www.metatitan.com/php/21/how-to-calculate-php-load-times.html</link>
		<comments>http://www.metatitan.com/php/21/how-to-calculate-php-load-times.html#comments</comments>
		<pubDate>Thu, 13 Dec 2007 12:42:06 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.metatitan.com/php/21/how-to-calculate-php-load-times.html</guid>
		<description><![CDATA[Here&#8217;s a popular request amongst those who are learning PHP. When developing PHP applications, it&#8217;s good practice to benchmark your pages to see if you need to further optimize your code. The following snippet will show you how much time it took your server to process your PHP document.
Insert this at or near the top [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a popular request amongst those who are learning PHP. When developing PHP applications, it&#8217;s good practice to benchmark your pages to see if you need to further optimize your code. The following snippet will show you how much time it took your server to process your PHP document.</p>
<p>Insert this at or near the top of your PHP file.</p>
<div class="codeBox">$m_time = explode(&#34; &#34;,microtime());<br />
$m_time = $m_time[0] + $m_time[1];<br />
$loadstart = $m_time;</div>
<p>Now place this snippet at or near the bottom of your file for the best results.</p>
<div class="codeBox">$m_time = explode(&#34; &#34;,microtime());<br />
$m_time = $m_time[0] + $m_time[1];<br />
$loadend = $m_time;<br />
$loadtotal = ($loadend - $loadstart);<br />
echo &#34;&lt;small&gt;&lt;em&gt;Generated page in &#34;. round($loadtotal,3) .&#34; seconds&lt;/em&gt;&lt;/small&gt;&#34;;</div>
<p>That&#8217;s it! I suggest adding this while you develop any PHP application, and include it even after the launch, so that you can see how well your scripts scale with the traffic you receive.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metatitan.com/php/21/how-to-calculate-php-load-times.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Backing up a MySQL Database Using Cron</title>
		<link>http://www.metatitan.com/mysql/20/backing-up-a-mysql-database-using-cron.html</link>
		<comments>http://www.metatitan.com/mysql/20/backing-up-a-mysql-database-using-cron.html#comments</comments>
		<pubDate>Mon, 10 Dec 2007 15:44:06 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.metatitan.com/mysql/20/backing-up-a-mysql-database-using-cron.html</guid>
		<description><![CDATA[It sure has been awhile since I&#8217;ve updated, things have been pretty busy and I just haven&#8217;t had time. Anyway, the most important and often overlooked part of running a dynamic MySQL website is backing up your data often. Losing your file system often doesn&#8217;t hurt as much as losing all of your content, especially [...]]]></description>
			<content:encoded><![CDATA[<p>It sure has been awhile since I&#8217;ve updated, things have been pretty busy and I just haven&#8217;t had time. Anyway, the most important and often overlooked part of running a dynamic MySQL website is backing up your data often. Losing your file system often doesn&#8217;t hurt as much as losing all of your content, especially when running a script that&#8217;s easily replaceable like vBulletin, Wordpress, etc. Backing up your data can be a chore, so this is the simple method I use for an automated backup of my databases.</p>
<p>1) SSH in your box</p>
<p>2) Open up your crontab, to do this type:<br />
<em>crontab -e</em></p>
<p>3) Add the job to your crontab, this is what I use:<br />
<em>30 0 * * * date=`date -I` ; mysqldump -a -u<strong>user</strong> -p<strong>password</strong> <strong>dbname</strong> &gt; <strong>/path/to/dump_$date.sql</strong></em></p>
<p>I&#8217;ll break down what&#8217;s going on in the above line and what you need to edit
<ul>
<li>30 0 * * * - This specifies the interval in which it will backup your data. Minutes, hours, days of the month, months, days of the week, respectively. In my case, I&#8217;m going to be running this every day at 12:30 AM. Asterisk out values which you do not need to limit.</li>
<li>user - Enter your mysql username here</li>
<li>password - Enter your mysql password here</li>
<li>It&#8217;s important to note that -uuser is not a typo, you need to prefix -u on your username, so if it&#8217;s jsmith, you will enter -ujsmith. Same goes for your password.</li>
<li>dbname - Enter the mysql database name which you want to backup</li>
<li>/path/to/dump_$date.sql - Enter the directory you wish to back up your data to, include $date if you want a datestamp on your backup names. Don&#8217;t back this up to a web accessible directory as anyone would be able to access your database information and view potentially sensitive data.</li>
</ul>
<p>Once your cron job is up and running you can then use a 3rd party backup service to automatically pull those backups across onto secure networks at set intervals (ie: every day at 12:40 AM). Talk to your hosting provider as many already provide backup services like this. You can also choose to manually download them onto your hard drive if you prefer a most cost effective approach. Just remember to go in weekly or monthly to delete older backups if necessary - those with large databases may eventually max out their hard drive space if left unattended.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metatitan.com/mysql/20/backing-up-a-mysql-database-using-cron.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>New Look</title>
		<link>http://www.metatitan.com/misc/19/new-look.html</link>
		<comments>http://www.metatitan.com/misc/19/new-look.html#comments</comments>
		<pubDate>Tue, 30 Oct 2007 14:13:30 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://www.metatitan.com/misc/19/new-look.html</guid>
		<description><![CDATA[It felt unfitting for a blog that teaches and discusses web development tips &#038; tricks to use a generic widely used WordPress theme. I&#8217;ve launched a new custom look for Meta Titan and I&#8217;m just working out the kinks and making adjustments.
I have a couple entries planned for this week so keep an eye out [...]]]></description>
			<content:encoded><![CDATA[<p>It felt unfitting for a blog that teaches and discusses web development tips &#038; tricks to use a generic widely used WordPress theme. I&#8217;ve launched a new custom look for Meta Titan and I&#8217;m just working out the kinks and making adjustments.</p>
<p>I have a couple entries planned for this week so keep an eye out for them!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metatitan.com/misc/19/new-look.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Show/Hide Content With CSS &#038; Javascript</title>
		<link>http://www.metatitan.com/css/18/showhide-content-with-css-javascript.html</link>
		<comments>http://www.metatitan.com/css/18/showhide-content-with-css-javascript.html#comments</comments>
		<pubDate>Sun, 28 Oct 2007 05:51:50 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.metatitan.com/css/18/showhide-content-with-css-javascript.html</guid>
		<description><![CDATA[My apologies for the recent lack of updates and the briefness of this post, things have been (and still are) really busy on my end. Anyway, when building websites for my clients a popular request is to have content that can be toggled by the user. Today I&#8217;ll show you have to have this effect [...]]]></description>
			<content:encoded><![CDATA[<p>My apologies for the recent lack of updates and the briefness of this post, things have been (and still are) really busy on my end. Anyway, when building websites for my clients a popular request is to have content that can be toggled by the user. Today I&#8217;ll show you have to have this effect done really quickly. Although this method does not support persistence (saving cookies to the users browser to remember what they have hidden/shown), I&#8217;m sure there are some who will find it useful.</p>
<p>Place this code in your &lt;head&gt; tags.</p>
<div class="codeBox">&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
function shToggle(content) {<br />
	if (document.getElementById(content).style.display == &#8220;none&#8221;)<br />
		document.getElementById(content).style.display = &#8220;block&#8221;<br />
	else<br />
		document.getElementById(content).style.display = &#8220;none&#8221;<br />
}<br />
&lt;/script&gt;</div>
<p>Now you can effectively show/hide content by placing <strong>id=&#8221;<em>elementname</em>&#8221; style=&#8221;display:none;&#8221;</strong> inside the element tag you wish to be toggle-able, and <strong> onclick=&#8221;shToggle(&#8217;<em>elementname</em>&#8216;); return false;&#8221;</strong> inside the link code of the image or text the user clicks to toggle it. You can see a live example of it on <a href="http://www.metatitan.com/files/showhide.html">this page</a>, or simply look at the example code snippet below.</p>
<div class="codeBox">&lt;strong&gt;What&#8217;s the name of Calgary&#8217;s NHL Team?&lt;/span&gt;<br />
&lt;a href=&#8221;javascript:void(0);&#8221; onclick=&#8221;shToggle(&#8217;calgary&#8217;); return false;&#8221;&gt;show/hide answer&lt;/a&gt;</p>
<p>&lt;div id=&#8221;calgary&#8221; style=&#8221;display:none;&#8221;&gt;The Calgary Flames&lt;/div&gt;</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.metatitan.com/css/18/showhide-content-with-css-javascript.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Automating Photoshop; Actions and Batching Explained</title>
		<link>http://www.metatitan.com/photoshop/17/automating-photoshop-actions-and-batching-explained.html</link>
		<comments>http://www.metatitan.com/photoshop/17/automating-photoshop-actions-and-batching-explained.html#comments</comments>
		<pubDate>Tue, 23 Oct 2007 04:40:06 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Photoshop]]></category>

		<guid isPermaLink="false">http://www.metatitan.com/photoshop/17/automating-photoshop-actions-and-batching-explained.html</guid>
		<description><![CDATA[If you work in Adobe Photoshop regularly, you&#8217;ll often find yourself engaged in repetitive loops that have a tendency to drain on your stamina and attention span. Today I&#8217;ll teach you how to use, and embrace the Action menu, a tool that will change the way you approach boring, monotonous tasks. Whether it&#8217;s mass resizing [...]]]></description>
			<content:encoded><![CDATA[<p>If you work in Adobe Photoshop regularly, you&#8217;ll often find yourself engaged in repetitive loops that have a tendency to drain on your stamina and attention span. Today I&#8217;ll teach you how to use, and embrace the Action menu, a tool that will change the way you approach boring, monotonous tasks. Whether it&#8217;s mass resizing photos, embedding watermarks, adding filters, or perhaps something more or less complex, most of it can be automated.<br />
 <a href="http://www.metatitan.com/photoshop/17/automating-photoshop-actions-and-batching-explained.html#more-17" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.metatitan.com/photoshop/17/automating-photoshop-actions-and-batching-explained.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Protecting Your PHP/MySQL Queries from SQL Injection</title>
		<link>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html</link>
		<comments>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comments</comments>
		<pubDate>Sun, 21 Oct 2007 10:36:08 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html</guid>
		<description><![CDATA[SQL injection is a serious concern for webmasters, as an experienced attacker can use this hacking technique to gain access to sensitive data and/or potentially cripple your database. If you haven&#8217;t secured your applications, I implore you to get yourself familiar with the following method and grind it into your coding routine. One unsafe query [...]]]></description>
			<content:encoded><![CDATA[<p>SQL injection is a serious concern for webmasters, as an experienced attacker can use this hacking technique to gain access to sensitive data and/or potentially cripple your database. If you haven&#8217;t secured your applications, I implore you to get yourself familiar with the following method and grind it into your coding routine. One unsafe query can result in a nightmare for you or your client.</p>
<p>I&#8217;ve read through a lot of guides, and they tend to over complicate this, so I&#8217;ll be as straight forward as possible. In PHP the easiest way is to pass your data through the <a href="http://www.php.net/mysql_real_escape_string">mysql_real_escape_string</a> function. By escaping special characters on fields where the user can manipulate the database, you will avoid being vulnerable. Take a look below at the example of what to do and what not to do.</p>
<div class="codesnip-container" >
<pre>// This is a vulnerable query.
$query = "SELECT * FROM products WHERE name='$productname'";
mysql_query($query);

// This query is more secure
$query = sprintf("SELECT * FROM products WHERE name='%s'",
mysql_real_escape_string($productname));
mysql_query($query);</pre>
</div>
<p>Since I primarily code in PHP, I can&#8217;t confidently provide techniques for other programming languages. The most important part of protecting yourself is stopping users from being able to pass unaltered database manipulative special characters, like single quotes.</p>
<p><a href="http://msdn.microsoft.com/msdnmag/issues/04/09/SQLInjection/">MSDN - SQL Injection Article</a><br />
<a href="http://en.wikipedia.org/wiki/SQL_injection">Wikipedia - SQL Inection</a><br />
<a href="http://www.securiteam.com/securityreviews/5DP0N1P76E.html">SecuriTeam - SQL Injection Walkthrough</a><br />
<a href="http://www.sitepoint.com/article/sql-injection-attacks-safe">SitePoint - SQL Injection Attacks, Are You safe?</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>The Digg Effect - Can your hosting plan handle this? [Pic]</title>
		<link>http://www.metatitan.com/misc/15/the-digg-effect-can-your-hosting-plan-handle-it-pic.html</link>
		<comments>http://www.metatitan.com/misc/15/the-digg-effect-can-your-hosting-plan-handle-it-pic.html#comments</comments>
		<pubDate>Sat, 20 Oct 2007 07:09:12 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://www.metatitan.com/misc/15/the-digg-effect-can-your-hosting-plan-handle-it-pic.html</guid>
		<description><![CDATA[Meta Titan traffic spike yesterday, I found this amusing:

The fort held up, but it really puts it into perspective for those who are on penny and dime hosting plans.
]]></description>
			<content:encoded><![CDATA[<p>Meta Titan traffic spike yesterday, I found this amusing:</p>
<p><img src="http://www.metatitan.com/images/digg.png" alt="Digg Effect" /></p>
<p>The fort held up, but it really puts it into perspective for those who are on penny and dime hosting plans.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metatitan.com/misc/15/the-digg-effect-can-your-hosting-plan-handle-it-pic.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>CSS Builder - Brand New Meta Titan Tool</title>
		<link>http://www.metatitan.com/css/14/css-builder-brand-new-meta-titan-tool.html</link>
		<comments>http://www.metatitan.com/css/14/css-builder-brand-new-meta-titan-tool.html#comments</comments>
		<pubDate>Fri, 19 Oct 2007 02:55:09 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.metatitan.com/css/14/css-builder-brand-new-meta-titan-tool.html</guid>
		<description><![CDATA[You&#8217;ve seen it done in programs like Adobe Dreamweaver, but believe it or not, there aren&#8217;t a whole lot of decent CSS generators in the flavor of my new tool (that I could find with a thorough Google search at least).
The Meta Titan CSS Builder provides a human readable interface for generating your selector (class/id/tag) [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;ve seen it done in programs like Adobe Dreamweaver, but believe it or not, there aren&#8217;t a whole lot of decent CSS generators in the flavor of my new tool (that I could find with a thorough Google search at least).</p>
<p>The Meta Titan CSS Builder provides a human readable interface for generating your selector (class/id/tag) code with valid syntax on the fly. Fill out the form, press build, copy the code, paste it into your stylesheet. I believe it will improve your productivity, especially if you&#8217;re a beginner / intermediate user and haven&#8217;t memorized all of the property names and appropriate values.</p>
<p>Give it a try, and a bookmark - <a href="http://www.metatitan.com/cssbuilder.php">click here</a>!</p>
<p>This is the product of about 1 weeks worth of casual coding. I&#8217;m planning a version 2 that cleans up the interface a bit, and I&#8217;ll be taking suggestions on what I can approve.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metatitan.com/css/14/css-builder-brand-new-meta-titan-tool.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>How to Check Link Popularity in Google &#038; Yahoo With PHP</title>
		<link>http://www.metatitan.com/php/13/how-to-check-your-link-popularity-in-google-yahoo-alexa-with-php.html</link>
		<comments>http://www.metatitan.com/php/13/how-to-check-your-link-popularity-in-google-yahoo-alexa-with-php.html#comments</comments>
		<pubDate>Tue, 16 Oct 2007 20:31:01 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.metatitan.com/php/13/how-to-check-your-link-popularity-in-google-yahoo-alexa-with-php.html</guid>
		<description><![CDATA[Everyone knows that the best traffic you can get is organic, meaning people who come to your site naturally with genuine interest. Search engines like Google &#038; Yahoo are notorious for placing a high value on the amount of websites that are linking to you. While their algorithms haven&#8217;t been completely unraveled yet, SEO specialists [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone knows that the best traffic you can get is organic, meaning people who come to your site naturally with genuine interest. Search engines like Google &#038; Yahoo are notorious for placing a high value on the amount of websites that are linking to you. While their algorithms haven&#8217;t been completely unraveled yet, SEO specialists have a pretty good idea of how to make your site rank higher, and it usually starts with link building (assuming you have quality content first of course!). </p>
<p>The amount of links your site has indexed in Google &#038; Yahoo can change often, so checking can be an arduous task. Luckily there are a ton of tools out there for this, but you&#8217;re not here for that, are you? You&#8217;re here because you want the code to run your own service, or maybe you want your own local copy of it, or maybe you just want to see how it works. The script below will check your backlinks in Google and Yahoo, as well as your Alexa rating. Feel free to modify and redistribute (non-commercially) as you see fit.</p>
<p><a href="http://www.metatitan.com/files/linkcheck.php">Live Demo</a> | <a href="http://www.metatitan.com/files/linkcheck.phps">View Source Online</a></p>
<div class="codeBox">&lt;?php<br />
// Setting the URL variable<br />
$link = $_GET[&#39;url&#39;];</p>
<p>// Google Backlinks<br />
function fetch_google($uri) {<br />
	$uri = trim(eregi_replace(&#39;http://&#39;, &#39;&#39;, $uri)); $uri = trim(eregi_replace(&#39;http&#39;, &#39;&#39;, $uri));<br />
	$url = &#39;http://www.google.com/search?hl=en&#038;lr=&#038;ie=UTF-8&#038;q=link:&#39;.$uri;<br />
	$v = file_get_contents($url);<br />
	preg_match(&#39;/of about \&lt;b\&gt;(.*?)\&lt;\/b\&gt;/si&#39;,$v,$r);<br />
	return ($r[1]) ? $r[1] : &#39;0&#39;;<br />
}</p>
<p>// Yahoo Inlinks<br />
function fetch_yahoo($uri) {<br />
    $uri = trim(eregi_replace(&#39;http://&#39;, &#39;&#39;, $uri)); $uri = trim(eregi_replace(&#39;http&#39;, &#39;&#39;, $uri));<br />
	$url = &#39;http://siteexplorer.search.yahoo.com/search?p=http://&#39;.$uri.&#39;&#038;bwm=i&#038;bwmf=s&#038;bwmo=&#038;fr2=seo-rd-se&#39;;<br />
	$v = file_get_contents($url);<br />
	preg_match(&#39;/of about \&lt;strong\&gt;(.*?) \&lt;\/strong\&gt;/si&#39;,$v,$r);<br />
	return ($r[1]) ? $r[1] : &#39;0&#39;;<br />
}</p>
<p>// Alexa Rating<br />
function fetch_alexa($uri){<br />
    $uri = trim(eregi_replace(&#39;http://&#39;, &#39;&#39;, $uri)); $uri = trim(eregi_replace(&#39;http&#39;, &#39;&#39;, $uri));<br />
	$url = &#39;http://data.alexa.com/data?cli=10&#038;dat=snbamz&#038;url=&#39; . urlencode($uri);<br />
	$v = file_get_contents($url);<br />
	preg_match(&#39;/\&lt;popularity url\=&quot;(.*?)&quot; TEXT\=&quot;([0-9]+)&quot;\/\&gt;/si&#39;, $v, $r);<br />
	return ($r[2]) ? $r[2] : &#39;0&#39;;<br />
} </p>
<p>// Page Header<br />
echo &quot;&lt;h2&gt;Search Engine Popularity&lt;/h2&gt;&quot;;</p>
<p>// Display Links and Information<br />
if (isset($link)) {<br />
	echo &quot;&lt;strong&gt;URL:&lt;/strong&gt; &quot; . $link . &quot;&lt;br /&gt;&quot;;<br />
	echo &quot;&lt;strong&gt;Google Backlinks:&lt;/strong&gt; &quot; . fetch_google($link) . &quot;&lt;br /&gt;&quot;;<br />
	echo &quot;&lt;strong&gt;Yahoo Backlinks:&lt;/strong&gt; &quot; . fetch_yahoo($link) . &quot;&lt;br /&gt;&quot;;<br />
	echo &quot;&lt;strong&gt;Alexa Rating:&lt;/strong&gt; &quot; . fetch_alexa($link) . &quot;&lt;br /&gt;&quot;;<br />
}</p>
<p>// Search Form<br />
echo &quot;&lt;br /&gt;<br />
&lt;form action=\&quot;linkcheck.php\&quot; method=\&quot;get\&quot;&gt;<br />
&lt;input type=\&quot;text\&quot; name=\&quot;url\&quot; /&gt;<br />
&lt;input type=\&quot;submit\&quot; /&gt;<br />
&lt;/form&gt;&quot;;</p>
<p>?&gt;</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.metatitan.com/php/13/how-to-check-your-link-popularity-in-google-yahoo-alexa-with-php.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
