<?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>Cosmic Egg Studios</title>
	<atom:link href="http://www.cosmicegg.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cosmicegg.com</link>
	<description>Cosmic Egg is an established award winning Boston web design firm</description>
	<lastBuildDate>Mon, 25 Mar 2013 19:08:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Our Mascot (Mylo) meets R2D2</title>
		<link>http://www.cosmicegg.com/our-mascot-mylo-meets-r2d2/</link>
		<comments>http://www.cosmicegg.com/our-mascot-mylo-meets-r2d2/#comments</comments>
		<pubDate>Sun, 12 Aug 2012 01:19:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Website Showcase]]></category>

		<guid isPermaLink="false">http://www.cosmicegg.com/?p=977</guid>
		<description><![CDATA[Mylo just met R2D2 and I'm not quite sure what they were saying to each other. However, I will make my best guess... &#160; &#160; &#160;]]></description>
				<content:encoded><![CDATA[<p>Mylo just met R2D2 and I'm not quite sure what they were saying to each other. However, I will make my best guess...</p>
<div id="attachment_978" class="wp-caption alignnone" style="width: 310px"><a href="http://www.cosmicegg.com/wp-content/uploads/2012/08/mylo1.jpg"><img class="size-medium wp-image-978" title="mylo1" src="http://www.cosmicegg.com/wp-content/uploads/2012/08/mylo1-300x200.jpg" alt="" width="300" height="200" /></a><p class="wp-caption-text">I smell the Force on you</p></div>
<p>&nbsp;</p>
<div id="attachment_986" class="wp-caption alignnone" style="width: 310px"><a href="http://www.cosmicegg.com/wp-content/uploads/2012/08/mylo5.jpg"><img class="size-medium wp-image-986" title="mylo5" src="http://www.cosmicegg.com/wp-content/uploads/2012/08/mylo5-300x215.jpg" alt="" width="300" height="215" /></a><p class="wp-caption-text">I don't understand your beeps and whistles ?</p></div>
<p>&nbsp;</p>
<div id="attachment_990" class="wp-caption alignnone" style="width: 310px"><a href="http://www.cosmicegg.com/wp-content/uploads/2012/08/mylo6.jpg"><img class="size-medium wp-image-990" title="mylo6" src="http://www.cosmicegg.com/wp-content/uploads/2012/08/mylo6-300x200.jpg" alt="" width="300" height="200" /></a><p class="wp-caption-text">Beep Beep Boop Whistle Beep Boop Beep (get me away from this crazy dog now!)</p></div>
<p>&nbsp;</p>
<p><div id="attachment_979" class="wp-caption alignnone" style="width: 310px"><a href="http://www.cosmicegg.com/wp-content/uploads/2012/08/mylo2.jpg"><img class="size-medium wp-image-979" title="mylo2" src="http://www.cosmicegg.com/wp-content/uploads/2012/08/mylo2-300x177.jpg" alt="" width="300" height="177" /></a><p class="wp-caption-text">Don't worry he's cool</p>
<div class="mceTemp">
<dl id="attachment_980" class="wp-caption" style="width: 310px;">
<dt class="wp-caption-dt"><a href="http://www.cosmicegg.com/wp-content/uploads/2012/08/mylo3.jpg"><img class="size-medium wp-image-980" title="mylo3" src="http://www.cosmicegg.com/wp-content/uploads/2012/08/mylo3-300x204.jpg" alt="" width="300" height="204" /></a></dt>
<dd class="wp-caption-dd">Where's his Lightsaber?</p></div> </dd>
</dl>
</div>
<div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://www.cosmicegg.com/our-mascot-mylo-meets-r2d2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 20 Email Marketing Terms You Should Know</title>
		<link>http://www.cosmicegg.com/top-20-email-marketing-terms-you-should-know/</link>
		<comments>http://www.cosmicegg.com/top-20-email-marketing-terms-you-should-know/#comments</comments>
		<pubDate>Sun, 29 Jul 2012 16:10:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Search Engine Optimization]]></category>

		<guid isPermaLink="false">http://www.cosmicegg.com/?p=953</guid>
		<description><![CDATA[Online marketing has been a key strategy for our clients. However, there is a lot of jargon that may seem confusing. This is a great cheat sheet from our affiliate partner; Constant Contact. This was written by Michelle Keegan,  Constant Contact Email Marketing Expert If you have ever felt out of your depth in a <a href="http://www.cosmicegg.com/top-20-email-marketing-terms-you-should-know/">[...]</a>]]></description>
				<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-958" title="E-mail Marketing" src="http://www.cosmicegg.com/wp-content/uploads/2012/07/mail-300x270.jpg" alt="E-mail Marketing" width="300" height="270" />Online marketing has been a key strategy for our clients. However, there is a lot of jargon that may seem confusing. This is a great cheat sheet from our affiliate partner; Constant Contact.</p>
<p>This was written by Michelle Keegan,  Constant Contact Email Marketing Expert</p>
<p>If you have ever felt out of your depth in a discussion about email marketing, rest assured you are not alone. The top twenty common email marketing terms and definitions below will help you expand your email marketing vocabulary and make you look and feel like an expert.</p>
<p><span style="color: #33cccc;"><strong>Above-the-fold</strong></span><br />
The part of a web page that is visible without scrolling. It is generally more desirable placement on a Website because of its visibility.If you have a "join our mailing list" tag on your Website, you should place it "above the fold" making it easy for visitors to opt-in.</p>
<p><span style="color: #33cccc;"><strong>CPM (or Cost per thousand)</strong></span><br />
In e-mail marketing, CPM commonly refers to the cost per 1000 names on a given rental list. For example, a rental list priced at $250 CPM would mean that the list owner charges $.25 per e-mail address.</p>
<p><span style="color: #33cccc;"><strong>CTR (or Click-through rate)</strong></span><br />
The percentage (the number of unique clicks divided by the number that were opened) of recipients that click on a given URL in your e-mail.</p>
<p><span style="color: #33cccc;"><strong>Conversion rate</strong></span><br />
The number or percentage of recipients who respond to your call-to-action in a given e-mail marketing campaign or promotion. This is the measure of your e-mail campaign's success. You may measure conversion in sales, phone calls, appointments etc.</p>
<p><span style="color: #33cccc;"><strong>E-mail blocking</strong></span><br />
E-mail blocking typically refers to blocking by ISPs. E-mails that are blocked are not processed through the ISP and are essentially prevented from reaching their addressed destination. ISPs actively block email coming from suspected spammers.</p>
<p><span style="color: #33cccc;"><strong>Email newsletter ads or sponsorships</strong></span><br />
Buying ad space in an email newsletter or sponsoring a specific article or series of articles. Advertisers pay to have their ad (text, HTML or both depending on the publication) inserted into the body of the email.Email newsletter ads and sponsorships allow advertisers to reach a targeted audience driving traffic to a website, store or office, signups to a newsletter or sales of a product or service.</p>
<p><span style="color: #33cccc;"><strong>Hard bounce/Soft bounce</strong></span><br />
A hard bounce is the failed delivery of an e-mail due to a permanent reason like a non-existent address. A soft bounce is the failed delivery of an e-mail due to a temporary issue, like a full mailbox or an unavailable server.</p>
<p><span style="color: #33cccc;"><strong>House list (or Retention List)</strong></span><br />
A permission-based list that you built yourself. Use it to market, cross sell and up-sell, and to establish a relationship with customers over time. Your house list is one of your most valuable assets because it is 7 times less expensive to market to an existing customer than it is to acquire a new one. Use every opportunity to add to it and use it.</p>
<p><span style="color: #33cccc;"><strong>HTML e-mail</strong></span><br />
An e-mail that is formatted using Hypertext Markup Language instead of plain text. HTML makes it possible to include unique fonts, graphics and background colors. HTML makes an e-mail more interesting and when used properly can generate higher response rates than plain text.</p>
<p><span style="color: #33cccc;"><strong>Open rate</strong></span><br />
The percentage of e-mails opened in any given e-mail marketing campaign, or the percentage opened of the total number of e-mails sent.</p>
<p><span style="color: #33cccc;"><strong>Opt-in (or Subscribe)</strong></span><br />
To opt-in or subscribe to an e-mail list is to choose to receive e-mail communications by supplying your e-mail address to a particular company, website or individual thereby giving them permission to e-mail you. The subscriber can often indicate areas of personal interest (e.g. mountain biking) and/or indicate what types of e-mails she wishes to receive from the sender (e.g. newsletters).</p>
<p><span style="color: #33cccc;"><strong>Opt-out (or Unsubscribe)</strong></span><br />
To opt-out or unsubscribe from an e-mail list is to choose not to receive communications from the sender by requesting the removal of your e-mail address from their list.</p>
<p><span style="color: #33cccc;"><strong>Permission-based e-mail</strong></span><br />
E-mail sent to recipients who have opted-in or subscribed to receive e-mail communications from a particular company, website or individual. Permission is an absolute prerequisite for legitimate and profitable e-mail marketing.</p>
<p><span style="color: #33cccc;"><strong>Privacy policy</strong></span><br />
A clear description of a website or company's policy on the use of information collected from and about website visitors and what they do, and do not do, with the data.Your privacy policy builds trust especially among those who opt-in to receive e-mail from you or those who register on your site. If subscribers, prospects and customers know their information is safe with you, they will likely share more information with you making your relationship that much more valuable.</p>
<p><span style="color: #33cccc;"><strong>Rental list (or Acquisition list)</strong></span><br />
A list of prospects or a targeted group of recipients who have opt-in to receive information about certain subjects. Using permission-based rental lists, marketers can send e-mail messages to audiences targeted by interest category, profession, demographic information and more. Renting a list usually costs between $.10 and $.40 per name. Be sure your rental list is a certified permission-based, opt-in list. As I mentioned last week, permission-based lists are rented, not sold. Don't be fooled by a list offer that sounds too good to be true. Save the $19.95 and buy yourself a George Foreman grill instead. Unlike the cheap list, the grill is worth the money.</p>
<p><span style="color: #33cccc;"><strong>Signature file (or sig file for short</strong>)</span><br />
A tagline or short block of text at the end of an e-mail message that identifies the sender and provides additional information such as company name and contact information.Your signature file is a marketing opportunity. Use it to convey a benefit and include a call-to-action with a link.</p>
<p><span style="color: #33cccc;"><strong>Spam or UCE (Unsolicited Commercial E-mail)</strong></span><br />
E-mail sent to someone who has not opt-in or given permission to the sender.Do you get spam? (a rhetorical question, to be sure) Find out how the sender obtained your e-mail address.</p>
<p><span style="color: #33cccc;"><strong>Targeting</strong></span><br />
Selecting a target audience or group of individuals likely to be interested in a certain product or service. Targeting is very important for an e-mail marketer because targeted and relevant e-mail campaigns, yield a higher response and result in fewer unsubscribes.</p>
<p><span style="color: #33cccc;"><strong>URL (or Universal Resource Locator)</strong></span><br />
A website, page or any other document address or location on the Internet. URLs indicate the location of every file on every computer accessible through the Internet.</p>
<p><span style="color: #33cccc;"><strong>Viral Marketing</strong></span><br />
A type of marketing that is carried out voluntarily by a company's customers. It is often referred to as word-of-mouth advertising. Email has made this type of marketing very prevalent. Tools such as "send this page, article or website to a friend" encourage people to refer or recommend your company product, service or a specific offer to others.</p>
<div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://www.cosmicegg.com/top-20-email-marketing-terms-you-should-know/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>26 Tips for Managing Social Media</title>
		<link>http://www.cosmicegg.com/26-tips-for-managing-social-media/</link>
		<comments>http://www.cosmicegg.com/26-tips-for-managing-social-media/#comments</comments>
		<pubDate>Tue, 17 Jul 2012 00:26:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Search Engine Optimization]]></category>

		<guid isPermaLink="false">http://www.cosmicegg.com/?p=941</guid>
		<description><![CDATA[&#160; Do you wonder how to go about exercising good social etiquette and managing your social networking communities, all at the same time? Social media community management has expanded into a growing field and there’s a lot to think about. Here's a great link regarding great tips... http://www.socialmediaexaminer.com/social-media-community-management/]]></description>
				<content:encoded><![CDATA[<p><img class="wp-image-942 alignleft" title="Social-Media-Sites_jpg" src="http://www.cosmicegg.com/wp-content/uploads/2012/07/Social-Media-Sites_jpg-300x276.png" alt="Social Media" width="209" height="193" /></p>
<p>&nbsp;</p>
<p>Do you wonder how to go about exercising good social etiquette and managing your social networking communities, all at the same time?</p>
<p>Social media community management has expanded into a growing field and there’s a lot to think about.</p>
<p>Here's a great link regarding great tips...</p>
<p>http://www.socialmediaexaminer.com/social-media-community-management/</p>
<div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://www.cosmicegg.com/26-tips-for-managing-social-media/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coconut Oil&#8217;s</title>
		<link>http://www.cosmicegg.com/coconut-oils/</link>
		<comments>http://www.cosmicegg.com/coconut-oils/#comments</comments>
		<pubDate>Sun, 08 Jul 2012 16:50:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Our Art]]></category>

		<guid isPermaLink="false">http://www.cosmicegg.com/?p=926</guid>
		<description><![CDATA[If you're looking for a healthy alternative in cooking oil, we suggest you try Dr. Bronner's NEW Whole and White Kernel Coconut Oil.  Extensive field research in the tropics shows that people who follow a traditional diet high in coconut oil enjoy excellent cardiovascular health. Clinical research confirms that the saturated medium chain fatty acids <a href="http://www.cosmicegg.com/coconut-oils/">[...]</a>]]></description>
				<content:encoded><![CDATA[<p style="text-align: left;">If you're looking for a healthy alternative in cooking oil, we suggest you try Dr. Bronner's NEW Whole and White Kernel Coconut Oil.  Extensive field research in the tropics shows that people who follow a traditional diet high in coconut oil enjoy excellent cardiovascular health. Clinical research confirms that the saturated medium chain fatty acids (MCT's) in VCO, such as lauric acid, actually improve blood cholesterol by increasing the ratio of HDL to LDL cholesterol.</p>
<p>We produced the packaging and photography for the 14oz and 30oz jars.</p>
<p>&nbsp;</p>

<a href='http://www.cosmicegg.com/coconut-oils/coconut_oils_in_kitchen/' title='Coconut_Oils_in_Kitchen'><img width="150" height="150" src="http://www.cosmicegg.com/wp-content/uploads/2012/07/Coconut_Oils_in_Kitchen-150x150.jpg" class="attachment-thumbnail" alt="Dr. Bronner&#039;s 14oz Coconut Oil&#039;s" /></a>
<a href='http://www.cosmicegg.com/coconut-oils/30ozcoconut_oils_in_kitchen_image/' title='30oz Coconut Oil'><img width="150" height="150" src="http://www.cosmicegg.com/wp-content/uploads/2012/07/30ozCoconut_Oils_in_Kitchen_image-150x150.jpg" class="attachment-thumbnail" alt="Dr. Bronner&#039;s 30oz Coconut Oil" /></a>

<p>&nbsp;</p>
<p>&nbsp;</p>
<div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://www.cosmicegg.com/coconut-oils/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hardening WordPress</title>
		<link>http://www.cosmicegg.com/hardening-wordpress/</link>
		<comments>http://www.cosmicegg.com/hardening-wordpress/#comments</comments>
		<pubDate>Sun, 24 Jun 2012 05:27:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.cosmicegg.com/?p=871</guid>
		<description><![CDATA[Recently there's been an increase in the number of hacks attempts on many of the sites in which we use and love on a daily basis. Millions of them use the popular framework called Word Press http://wordpress.org/ . Right now it's one of the best CMSes that I've seen in awhile and we use it <a href="http://www.cosmicegg.com/hardening-wordpress/">[...]</a>]]></description>
				<content:encoded><![CDATA[<p>Recently there's been an increase in the number of hacks attempts on many of the sites in which we use and love on a daily basis. Millions of them use the popular framework called Word Press <a href="http://wordpress.org/" target="_blank">http://wordpress.org/</a> . Right now it's one of the best CMSes that I've seen in awhile and we use it quite a bit at Cosmic Egg. There are so many things that this powerful framework can do plus it has tons of plug-ins and themes.</p>
<p>Unfortunately with popularity it has attracted hackers who would love to get into your site and do malicious things. The good news is that theres a few plug-ins and tweaks that you can do to keep them out.</p>
<p>This article will discuss some security techniques to better harden and secure your Word Press site; this is especially effective in a hosted environment.</p>
<p><span style="font-size: large;"><strong>Step 1 ? Install Better WP Security (easy) .</strong></span></p>
<p>Better WP Security is the easiest, most effective way to secure any Word Press site in seconds.</p>
<p>You can download it here: <a href="http://wordpress.org/extend/plugins/better-wp-security/" target="_blank">http://wordpress.org/extend/plugins/better-wp-security/</a>.</p>
<p>Once downloaded; unzip it and upload it to your <strong>\wp-content\plugins\</strong> folder. Now login to Word Press and activate the plug-in. </p>
<p>Now you will see a new item called <strong>Security</strong> on the left hand side menu. Click on it and you will be prompted with:</p>
<p><a href="http://www.cosmicegg.com/wp-content/uploads/2012/06/wp-sec1.jpg"><img class="alignnone size-full wp-image-884" title="wp-sec1" src="http://www.cosmicegg.com/wp-content/uploads/2012/06/wp-sec1.jpg" alt="" width="560" height="250" /></a></p>
<p>Definitely make the backup by clicking <strong>"Create Database Backup"</strong>. It will take a few seconds but well worth the wait if something goes wrong.</p>
<p>Next you will see this text:</p>
<p><a href="http://www.cosmicegg.com/wp-content/uploads/2012/06/wp-sec2.jpg"><img class="alignnone size-full wp-image-890" title="wp-sec2" src="http://www.cosmicegg.com/wp-content/uploads/2012/06/wp-sec2.jpg" alt="" width="560" height="259" /></a></p>
<p>I personally do not want to change any core files as this could cause issues so let's just click <strong>"Do not allow this plugin to change WordPress core files."</strong></p>
<p>Finally you will be at the main landing page for all of the settings. You should see a list of color coded links that can be updated or changed.</p>
<p><span style="color: #0bf319;">? Items in green are fully secured. Good Job!</span><br />
<span style="color: #ff8000;">? Items in orange are partially secured. Turn on more options to fully secure these areas.</span><br />
<span style="color: #ff0000;">? Items in red are not secured. You should secure these items immediately</span><br />
<span style="color: #0080ff;">? Items in blue are not fully secured but may conflict with other themes, plugins, or the other operation of your site. Secure them on if you can but if you cannot do not worry about them.</span></p>
<p>There are many options but be sure to at least update the following items:</p>
<p><span style="color: #ff0000;">2. Your WordPress header is showing too much information to users.</span><br />
<span style="color: #ff0000;"> 8. Your login area is not protected from brute force attacks.</span></p>
<p>That it for this fantastic plug-in. The next set is a bit more advanced and will require you to have FTP access to the server.</p>
<p><span style="font-size: large;"><strong>Step 2 ?Restricting access to the wordpress login by IP address (advanced).</strong></span></p>
<p>This requires you edit or add a new file called <strong>".htaccess"</strong> to the root directory of your word press installation.</p>
<p>Before we start You will have to know what your IP address is so visit <a href="http://www.whatismyip.com/" target="_blank">http://www.whatismyip.com/</a> and save it for the next step. For this example we will be using <strong>123.456.789.012</strong>.</p>
<p>Next copy the code below and replace our dummy IP with yours</p>
<pre class="bash"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;Files .htaccess&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">deny from all</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/Files&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;Files wp-<span style="color: #c20cb9; font-weight: bold;">login</span>.php&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">order deny,allow</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">allow from <span style="color: #000000;">123.456</span><span style="color: #000000;">.789</span><span style="color: #000000;">.012</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">deny from all</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/Files&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>Finally past the updated code it into your "<strong>.htaccess</strong>" file save and upload it to you server. Now only you IP address can access the login page. You can add multiple address by duplicating the line "<strong>allow from 123.456.789.012</strong>" and replace it with the desired addresses.</p>
<p>Now that we have our site locked down you can sleep at night knowing that you site will be safe. If you have any questions or need help you can always reach me at: <a href="mailto:macguyver@cosmicegg.com">macguyver@cosmicegg.com</a></p>
<div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://www.cosmicegg.com/hardening-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Busy Designing!</title>
		<link>http://www.cosmicegg.com/busy-designing/</link>
		<comments>http://www.cosmicegg.com/busy-designing/#comments</comments>
		<pubDate>Wed, 20 Jun 2012 19:01:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Our Art]]></category>

		<guid isPermaLink="false">http://www.cosmicegg.com/?p=848</guid>
		<description><![CDATA[Recently, we had the pleasure of working on a bus wrap that is traveling with Ziggy Marley! Each side is promoting the various uses and benefits of industrial hemp, while including 2 of our clients who acknowledge the benefits of it, Dr. Bronner's Magic Soaps and Hemp History Week. Click here if you want to <a href="http://www.cosmicegg.com/busy-designing/">[...]</a>]]></description>
				<content:encoded><![CDATA[<p>Recently, we had the pleasure of working on a bus wrap that is traveling with Ziggy Marley!  Each side is promoting the various uses and benefits of industrial hemp, while including 2 of our clients who acknowledge the benefits of it, <a href="http://drbronner.com">Dr. Bronner's Magic Soaps</a> and <a href="http://www.hemphistoryweek.com">Hemp History Week</a>.</p>
<p><a href="http://www.ziggymarley.com/calendar.php">Click here</a> if you want to know his tour dates, and let us know if you spot our design!</p>

<a href='http://www.cosmicegg.com/busy-designing/photo-2/' title='side view of Dr. Bronner&#039;s Magic Soaps'><img width="150" height="150" src="http://www.cosmicegg.com/wp-content/uploads/2012/06/photo-2-150x150.jpg" class="attachment-thumbnail" alt="Left side view of Dr. Bronner&#039;s Magic Soaps Fair Trade initiatives" /></a>
<a href='http://www.cosmicegg.com/busy-designing/photo2a/' title='Front and right side view'><img width="150" height="150" src="http://www.cosmicegg.com/wp-content/uploads/2012/06/photo2a-150x150.jpg" class="attachment-thumbnail" alt="Front and right side view" /></a>
<a href='http://www.cosmicegg.com/busy-designing/photo2b/' title='Right side view of Hemp History Week'><img width="150" height="150" src="http://www.cosmicegg.com/wp-content/uploads/2012/06/photo2b-150x150.jpg" class="attachment-thumbnail" alt="Right side view of Hemp History Week" /></a>
<a href='http://www.cosmicegg.com/busy-designing/photo2c/' title='Rear side view'><img width="150" height="150" src="http://www.cosmicegg.com/wp-content/uploads/2012/06/photo2c-150x150.jpg" class="attachment-thumbnail" alt="Rear side view of some of Dr. Bronner&#039;s Magic Soap products" /></a>

<div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://www.cosmicegg.com/busy-designing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top Ten Seo Tactics</title>
		<link>http://www.cosmicegg.com/top-ten-seo-tactics/</link>
		<comments>http://www.cosmicegg.com/top-ten-seo-tactics/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 23:08:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Search Engine Optimization]]></category>

		<guid isPermaLink="false">http://www.cosmicegg.com/?p=770</guid>
		<description><![CDATA[1.?? ?Do not purchase a new domain unless you have to. The search engines put a lot of stock in how long your website and domain have been around. While you can purchase a new domain and redirect your old one to the new one, your best bet is to use your existing domain/website if <a href="http://www.cosmicegg.com/top-ten-seo-tactics/">[...]</a>]]></description>
				<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-773" title="topten" src="http://www.cosmicegg.com/wp-content/uploads/2011/11/topten.png" alt="Top Ten SEO Tactics" width="263" height="365" /></p>
<p>1.?? ?Do not purchase a new domain unless you have to. The search engines put a lot of stock in how long your website and domain have been around. While you can purchase a new domain and redirect your old one to the new one, your best bet is to use your existing domain/website if at all possible. If you're redesigning or starting from scratch and you have to use a brand-new domain for some reason, you can expect at least somewhat of a loss in search engine traffic. It could be anywhere from a few weeks to a few months or more.</p>
<p>2.?? ?Optimize your site for your target audience, not for the search engines. This may sound counterintuitive, but hear me out. The search engines are looking for pages that best fit the keyword phrase someone types into their little search box. If those "someones" are typing in search words that relate to what your site offers, then they are most likely members of your target audience. You need to optimize your site to meet *their* needs. If you don't know who your target audience is, then you need to find out one way or another. Look for studies online that might provide demographic information, and visit other sites, communities, or forums where your target audience might hang out and listen to what they discuss. This information will be crucial to your resulting website design, keyword research, and copywriting.</p>
<p>3.?? ?Research your keyword phrases extensively. The phrases you think your target market might be searching for may very well be incorrect. To find the optimal phrases to optimize for, use research tools such as KeywordDiscovery, Wordtracker or Google's Keyword Tool. Compile lists of the most relevant phrases for your site, and choose a few different ones for every page. Never shoot for general keywords such as "travel" or "vacation," as they are rarely (if ever) indicative of what your site is really about.</p>
<p>4.?? ?Design and categorize your site architecture and navigation based on your keyword research. Your research may uncover undiscovered areas of interest or ways of categorizing your products/services that you may wish to add to your site. For instance, let's say your site sells toys. There are numerous ways you could categorize and lay out your site so that people will find the toys they're looking for. Are people looking for toys to fit their child's stage of development? (Look for keyword phrases such as "preschool toys.") Or are they more likely to be seeking specific brands of toys? Most likely, your keyword research will show you that people are looking for toys in many different ways. Your job is to make sure that your site's navigation showcases the various ways of searching. Make sure you have links to specific-brand pages as well as specific age ranges, specific types of toys, etc.</p>
<p>5.?? ?Program your site to be "crawler-friendly." The search engines can't fill out forms, can't search your site, can't read JavaScript links and menus, and can't interpret graphics and Flash. This doesn't mean that you can't use these things on your site; you most certainly can! However, you do need to provide alternate means of navigating your site as necessary. If you have only a drop-down sequence of menus to choose a category or a brand of something, the search engine crawlers will never find those resulting pages. You'll need to make sure that you always have some form of HTML links in the main navigation on every page which link to the top-level pages of your site. From those pages, you'll need to have further HTML links to the individual product/service pages. (Please note that HTML links do NOT have to be text-only links. There's nothing wrong with graphical image navigation that is wrapped in standard &lt;a href&gt; tags, as the search engines can follow image links just fine.)</p>
<p>6.?? ?Label your internal text links and clickable image alt attributes (aka alt tags) as clearly and descriptively as possible. Your site visitors and the search engines look at the clickable portion of your links (aka the anchor text) to help them understand what they're going to find once they click through. Don't make them guess what's at the other end with links that say "click here" or other non-descriptive words. Be as descriptive as possible with every text and graphical link on your site. The cool thing about writing your anchor text and alt attributes to be descriptive is that you can almost always describe the page you're pointing to by using its main keyword phrase.</p>
<p>7.?? ?Write compelling copy for the key pages of your site based on your chosen keyword phrases and your target market's needs, and make sure it's copy that the search engines can "see." This is a crucial component to having a successful website. The search engines need to read keyword-rich copy on your pages so they can understand how to classify your site. This copy shouldn't be buried in graphics or hidden in Flash. Write your copy based on your most relevant keyword phrases while also making an emotional connection with your site visitor. (This is where that target audience analysis comes in handy!) Understand that there is no magical number of words per page or number of times to use your phrases in your copy. The important thing is to use your keyword phrases only when and where it makes sense to do so for the real people reading your pages. Simply sticking keyword phrases at the top of the page for no apparent reason isn't going to cut it, and it just looks silly.</p>
<p>8.?? ?Incorporate your keyword phrases into each page's unique Title tag. Title tags are critical because they're given a lot of weight with every search engine. Whatever keyword phrases you've written your copy around should also be used in your Title tag. Remember that the information that you place in this tag is what will show up as the clickable link to your site at the search engines. Make sure that it accurately reflects the content of the page it's on, while also using the keyword phrases people might be using at a search engine to find your stuff.</p>
<p>9.?? ?Make sure your site is "link-worthy." Other sites linking to yours is a critical component of a successful search engine optimization campaign, as all of the major search engines place a good deal of emphasis on your site's overall link popularity. You can go out and request hundreds or thousands of links, but if your site stinks, why would anyone want to link to it? On the other hand, if your site is full of wonderful, useful information, other sites will naturally link to it without your even asking. It's fine to trade links; just make sure you are providing your site visitors with only the highest quality of related sites. When you link to lousy sites, keep in mind what this says to your site visitors as well as to the search engines.</p>
<p>10.?? ?Don't be married to any one keyword phrase or worried too much about rankings. If you've done the above 9 things correctly, you will start to see an increase in targeted search engine visitors to your site fairly quickly. Forget about where you rank for any specific keyword phrase and instead measure your results in increased traffic, sales, and conversions. (You can sign up for a Google Analytics for free, which easily tracks and measures those things that truly matter.) It certainly won't hurt to add new content to your site if it will really make your site more useful, but don't simply add a load of fluff just for the sake of adding something. It really is okay to have a business site that is just a business site and not a diatribe on the history of your products.</p>
<div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://www.cosmicegg.com/top-ten-seo-tactics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert a MySql database to Mongodb</title>
		<link>http://www.cosmicegg.com/convert-a-mysql-database-to-mongodb/</link>
		<comments>http://www.cosmicegg.com/convert-a-mysql-database-to-mongodb/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 20:52:29 +0000</pubDate>
		<dc:creator>steven_mckeon</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.cosmicegg.com/?p=764</guid>
		<description><![CDATA[I recently had a chance to try out one of the new NoSQL databases called MongoDB http://www.mongodb.org. This new class of databases seems to solve many of the bottlenecks in MySql and other relational databases. It will give you shear performance, self replication and scalability at not cost because it open source. MongoDB has plenty <a href="http://www.cosmicegg.com/convert-a-mysql-database-to-mongodb/">[...]</a>]]></description>
				<content:encoded><![CDATA[<p>I recently had a chance to try out one of the new NoSQL databases called MongoDB <a href="http://www.mongodb.org" target="_blank">http://www.mongodb.org</a>. This new class of databases seems to solve many of the bottlenecks in MySql and other relational databases. It will give you shear performance, self replication and  scalability at not cost because it open source.  MongoDB has plenty of drivers for other scripting and high-level languages I use PHP so I download the PHP driver. You can see the supported list here: <a href="http://www.mongodb.org/display/DOCS/Drivers" target="_blank">http://www.mongodb.org/display/DOCS/Drivers</a>. I will focus on installation of MongoDB on Centos and conversion of a MySQL database using PHP.<br />
<span id="more-764"></span><br />
<strong>Now lets get started by connecting to our server via SSH</strong></p>
<pre class="bash"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> yum <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">gcc</span> php php-pear -y</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> pecl <span style="color: #c20cb9; font-weight: bold;">install</span> mongo</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #7a0874; font-weight: bold;">echo</span> ?<span style="color: #007800;">extension=</span>mongo.so? &gt;&gt; /etc/php.ini</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> /etc/init.d/httpd restart</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">created blank <span style="color: #c20cb9; font-weight: bold;">file</span> called 10gen.repo <span style="color: #000000; font-weight: bold;">in</span> /etc/yum.repos.d/ </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">vi /etc/yum.repos.d/10gen.repo</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">past the content below</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">For CentOS on x86_64<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">64</span>-bit<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#------ copy after this line --------</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>10gen<span style="color: #7a0874; font-weight: bold;">&#93;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #007800;">name=</span>10gen Repository</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #007800;">baseurl=</span>http://downloads-distro.mongodb.org/repo/redhat/os/x86_64</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #007800;">gpgcheck=</span><span style="color: #000000;">0</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#------ end copy --------- </span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">For CentOS <span style="color: #000000;">5.4</span> and Fedora on x86<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">32</span>-bit<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#------ copy after this line ---------</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>10gen<span style="color: #7a0874; font-weight: bold;">&#93;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #007800;">name=</span>10gen Repository</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #007800;">baseurl=</span>http://downloads-distro.mongodb.org/repo/redhat/os/i686</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #007800;">gpgcheck=</span><span style="color: #000000;">0</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#------ end copy ---------</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">save <span style="color: #000000; font-weight: bold;">in</span> vi by using :wq</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> yum <span style="color: #c20cb9; font-weight: bold;">install</span> mongo-10gen mongo-10gen-server -y</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> /etc/init.d/mongod start</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> chkconfig mongod o</div></li></ol></pre>
<p><strong>Lets make sure that the database is working</strong></p>
<pre class="bash"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> now <span style="color: #7a0874; font-weight: bold;">type</span> <span style="color: #ff0000;">&quot;mongo&quot;</span> this will connect you to the database shell</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">If all goes well you should see something like:</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">MongoDB shell version: <span style="color: #000000;">1.8</span><span style="color: #000000;">.2</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">connecting to: <span style="color: #7a0874; font-weight: bold;">test</span></div></li></ol></pre>
<p><strong>Now we can use our script to convert our MySQL database to MongoDB</strong></p>
<p>create a new file called <strong>convertMySqlToMongo.php</strong></p>
<pre class="php"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// mysql settings</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$mydb</span>   = <span style="color: #ff0000;">&quot;database&quot;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$myconn</span> = <a href="http://www.php.net/mysql_connect"><span style="color: #000066;">mysql_connect</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'localhost'</span>,<span style="color: #ff0000;">'user'</span>,<span style="color: #ff0000;">'password'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$setmydb</span>   = <a href="http://www.php.net/mysql_select_db"><span style="color: #000066;">mysql_select_db</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$mydb</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$mytables</span> = getMyTables<span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$mydb</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//mongo db settings</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$modb</span>   = <span style="color: #ff0000;">&quot;database&quot;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$moConnect</span>=<span style="color: #ff0000;">&quot;mongodb://user:password@localhost&quot;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> getMyTables<span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$dbname</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #0000ff;">$tables</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #0000ff;">$sql</span> = <a href="http://www.php.net/mysql_query"><span style="color: #000066;">mysql_query</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;SHOW TABLES FROM $dbname &quot;</span><span style="color: #66cc66;">&#41;</span> or <a href="http://www.php.net/die"><span style="color: #000066;">die</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Error getting tables from $dbname&quot;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> <a href="http://www.php.net/mysql_num_rows"><span style="color: #000066;">mysql_num_rows</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$sql</span> <span style="color: #66cc66;">&#41;</span> &gt; <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">   <span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$table</span> = <a href="http://www.php.net/mysql_fetch_array"><span style="color: #000066;">mysql_fetch_array</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$sql</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">     <span style="color: #0000ff;">$explain</span> = explainMyTable<span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$table</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#41;</span>; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">     <span style="color: #0000ff;">$tables</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$table</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #0000ff;">$explain</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$tables</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> explainMyTable<span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$tbname</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #0000ff;">$explain</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #0000ff;">$sql</span> = <a href="http://www.php.net/mysql_query"><span style="color: #000066;">mysql_query</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;EXPLAIN $tbname&quot;</span><span style="color: #66cc66;">&#41;</span> or <a href="http://www.php.net/die"><span style="color: #000066;">die</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Error getting table structure&quot;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #0000ff;">$i</span> = <span style="color: #cc66cc;">0</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$get</span> = <a href="http://www.php.net/mysql_fetch_array"><span style="color: #000066;">mysql_fetch_array</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$sql</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">     <a href="http://www.php.net/array_push"><span style="color: #000066;">array_push</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$explain</span>, <span style="color: #0000ff;">$get</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#41;</span>; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">     <span style="color: #0000ff;">$i</span>++;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$explain</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> checkEncode<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$string</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> !mb_check_encoding<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$string</span>,<span style="color: #ff0000;">'UTF-8'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #b1b100;">return</span> <a href="http://www.php.net/mb_convert_encoding"><span style="color: #000066;">mb_convert_encoding</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$string</span>,<span style="color: #ff0000;">'UTF-8'</span>,<span style="color: #ff0000;">'ISO-8859-1'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$string</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">try <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #0000ff;">$moconn</span> = <span style="color: #000000; font-weight: bold;">new</span> Mongo<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$moConnect</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #0000ff;">$modb</span> = <span style="color: #0000ff;">$moconn</span>-&gt;<span style="color: #006600;">selectDB</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$modb</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> catch<span style="color: #66cc66;">&#40;</span>MongoConnectionException <span style="color: #0000ff;">$e</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <a href="http://www.php.net/die"><span style="color: #000066;">die</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$e</span>.<span style="color: #ff0000;">&quot;Problem during mongodb initialization. Please start mongodb server.&quot;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">foreach</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$mytables</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$table</span> =&gt; <span style="color: #0000ff;">$struct</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #0000ff;">$sql</span> = <a href="http://www.php.net/mysql_query"><span style="color: #000066;">mysql_query</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;SELECT * FROM $table LIMIT 0 , 500000&quot;</span><span style="color: #66cc66;">&#41;</span> or <a href="http://www.php.net/die"><span style="color: #000066;">die</span></a><span style="color: #66cc66;">&#40;</span> <a href="http://www.php.net/mysql_error"><span style="color: #000066;">mysql_error</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #0000ff;">$count</span> = <a href="http://www.php.net/mysql_num_rows"><span style="color: #000066;">mysql_num_rows</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$sql</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #808080; font-style: italic;">// Starts new collection on mongodb</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #0000ff;">$collection</span> = <span style="color: #0000ff;">$modb</span>-&gt;<span style="color: #0000ff;">$table</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #808080; font-style: italic;">// If it has content insert all content</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$count</span> &gt; <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    <span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$info</span> = <a href="http://www.php.net/mysql_fetch_array"><span style="color: #000066;">mysql_fetch_array</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$sql</span>, MYSQL_NUM <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #0000ff;">$infosize</span> = <a href="http://www.php.net/count"><span style="color: #000066;">count</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$info</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #0000ff;">$mosql</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">      <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$i</span>=<span style="color: #cc66cc;">0</span>; <span style="color: #0000ff;">$i</span> &lt; <span style="color: #0000ff;">$infosize</span>; <span style="color: #0000ff;">$i</span>++ <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">        <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>!<a href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$struct</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #0000ff;">$mosql</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$struct</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span> = checkEncode<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$info</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #0000ff;">$collection</span>-&gt;<span style="color: #006600;">insert</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$mosql</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Only create a new entry empty</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$i</span>=<span style="color: #cc66cc;">0</span>; <span style="color: #0000ff;">$i</span> &lt; <span style="color: #0000ff;">$infosize</span>; <span style="color: #0000ff;">$i</span>++ <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	  <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>!<a href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$struct</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">   		 <span style="color: #0000ff;">$mosql</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$struct</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #0000ff;">$collection</span>-&gt;<span style="color: #006600;">insert</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$mosql</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;Done! Please, check your MongoDB collection!&quot;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">?&gt;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>Now fire up your browser and launch the page. If all all goes well you should see<br />
<strong>"Done! Please, check your MongoDB collection!"</strong></p>
<p>That's it for now! Please leave a comment if you have any questions.</p>
<div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://www.cosmicegg.com/convert-a-mysql-database-to-mongodb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
