<?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/"
	>

<channel>
	<title>MilestoneDrive</title>
	<atom:link href="http://www.milestonedrive.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.milestonedrive.com</link>
	<description>Accomplishing my ultimate life goals, milestone after milestone</description>
	<pubDate>Mon, 05 Jan 2009 05:19:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HBS Submitted</title>
		<link>http://www.milestonedrive.com/hbs-submitted.html</link>
		<comments>http://www.milestonedrive.com/hbs-submitted.html#comments</comments>
		<pubDate>Mon, 05 Jan 2009 05:19:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.milestonedrive.com/?p=173</guid>
		<description><![CDATA[Not sure why i didn&#8217;t put a post up a few days ago to announce this but HBS application is officially submitted.  For my two readers out there, make sure you say an extra prayer or two for me.  Hopefully I get called for an interview.
]]></description>
			<content:encoded><![CDATA[<p>Not sure why i didn&#8217;t put a post up a few days ago to announce this but HBS application is officially submitted.  For my two readers out there, make sure you say an extra prayer or two for me.  Hopefully I get called for an interview.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.milestonedrive.com/hbs-submitted.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>OpenX Brought my Server Down!</title>
		<link>http://www.milestonedrive.com/openx-brought-my-server-down.html</link>
		<comments>http://www.milestonedrive.com/openx-brought-my-server-down.html#comments</comments>
		<pubDate>Sat, 03 Jan 2009 18:16:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.milestonedrive.com/openx-brought-my-server-down.html</guid>
		<description><![CDATA[I recently added a high-traffic site to my web server, and it gets a significant amount of traffic.  The site is local to the worcester area, though, so it isn&#8217;t a google or anything, but i&#8217;d say it gets a good amount of hits each day.  Plus, there seems to be a good [...]]]></description>
			<content:encoded><![CDATA[<p>I recently added a high-traffic site to my web server, and it gets a significant amount of traffic.  The site is local to the worcester area, though, so it isn&#8217;t a google or anything, but i&#8217;d say it gets a good amount of hits each day.  Plus, there seems to be a good amount of photo albums and such that cause a lot of traffic.</p>
<p>Anyway, I found in the maintenance.log and the debug.log that the maintenance.php file was running sometimes 7 times per second!!!</p>
<p>This was ok, I guess, when this particular server was less loaded, but when i added the site it was coming down every 7-8 hours.</p>
<p>OpenX says we should run the maintenance script once every hour, it was running once every time an ad was being served!</p>
<p>I updated CRON and the issue was fixed.  My server is healthy and humming along perfectly. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.milestonedrive.com/openx-brought-my-server-down.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>My Debian server died - and I still have no idea why</title>
		<link>http://www.milestonedrive.com/my-debian-server-died-and-i-still-have-no-idea-why.html</link>
		<comments>http://www.milestonedrive.com/my-debian-server-died-and-i-still-have-no-idea-why.html#comments</comments>
		<pubDate>Wed, 31 Dec 2008 14:15:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.milestonedrive.com/?p=170</guid>
		<description><![CDATA[I added a high-traffic website to a web server that I configured myself over the last year, and the extra traffic brought it down to its knees.  The server would stop responding and report that it was out of resources.
After upgrading the server and almost doubling its memory capacity, it is acting fine, and [...]]]></description>
			<content:encoded><![CDATA[<p>I added a high-traffic website to a web server that I configured myself over the last year, and the extra traffic brought it down to its knees.  The server would stop responding and report that it was out of resources.</p>
<p>After upgrading the server and almost doubling its memory capacity, it is acting fine, and even seems as though it would fit comfortably under the other server.</p>
<p>Oh well, I guess it was time to get a &#8220;beefier&#8221; system soon anyway!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.milestonedrive.com/my-debian-server-died-and-i-still-have-no-idea-why.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Add live web support to your company website - FREE!</title>
		<link>http://www.milestonedrive.com/add-live-web-support-to-your-company-website-free.html</link>
		<comments>http://www.milestonedrive.com/add-live-web-support-to-your-company-website-free.html#comments</comments>
		<pubDate>Sat, 20 Dec 2008 03:40:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Development]]></category>

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

		<category><![CDATA[Self-Employment]]></category>

		<category><![CDATA[Side Projects]]></category>

		<guid isPermaLink="false">http://www.milestonedrive.com/?p=164</guid>
		<description><![CDATA[I was messing around looking at general open source projects out now, and came across an amazing site.  Open Web Messenger does the job of enterprise support chat clients, but it is free!  I at one point looked into adding this functionality to a client website but they didn&#8217;t want to pay the $20 / [...]]]></description>
			<content:encoded><![CDATA[<p>I was messing around looking at general open source projects out now, and came across an amazing site.  <a href="http://openwebim.org/" target="_blank">Open Web Messenger</a> does the job of enterprise support chat clients, but it is free!  I at one point looked into adding this functionality to a client website but they didn&#8217;t want to pay the $20 / mo for the live support contract.</p>
<p>I installed and tried this system out, and since it&#8217;s open source you&#8217;re welcome to change anything you want to fit your needs.   I encourage you to take a look!</p>
<p><a href="http://openwebim.org/" target="_blank">Open Web Messenger website.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.milestonedrive.com/add-live-web-support-to-your-company-website-free.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Reactions from the MIT Sloan Admissions Seminar</title>
		<link>http://www.milestonedrive.com/reactions-from-the-mit-sloan-admissions-seminar.html</link>
		<comments>http://www.milestonedrive.com/reactions-from-the-mit-sloan-admissions-seminar.html#comments</comments>
		<pubDate>Fri, 19 Dec 2008 15:37:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Entrepreneurship]]></category>

		<category><![CDATA[Full-time Employment]]></category>

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

		<guid isPermaLink="false">http://www.milestonedrive.com/?p=160</guid>
		<description><![CDATA[I attended a Sloan Admissions Tips session today, one of about 25 or so people to attend.  It seemed pretty informative.  I sat next to a girl who had worked for Lehman Brothers for a few years and obviously was been laid off.  It was uncomfortable because one of my questions involved being ready for [...]]]></description>
			<content:encoded><![CDATA[<p>I attended a Sloan Admissions Tips session today, one of about 25 or so people to attend.  It seemed pretty informative.  I sat next to a girl who had worked for Lehman Brothers for a few years and obviously was been laid off.  It was uncomfortable because one of my questions involved being ready for Business School and actually not basing my decision to apply  on the economic conditions that have caused <a href="http://blog.clearadmit.com/2008/04/gmat-registration-volume-continues-to-climb/" target="_blank">GMAT registration numbers to increase by 10%</a>, and <a title="NY Times article linking economic times and business school applications" href="http://www.nytimes.com/2008/10/07/business/07SCHOOL.html" target="_blank">business school applications raise </a>by 30%.</p>
<p>The answer was somewhat simple, but not too clear, I think.  The director mentioned that anyone who is being forced/encouraged to apply to business school due to the conditions of the economy probably did not start as soon as those who are not, and therefore are at a slight disadvantage time-wise to others.  It was a satisfying response, but it is a shame that the economy is causing such an upward trend in applications.  She also said something that I had been thinking a lot, as well.  She said this economic standing is in a lot of people&#8217;s minds than being really true in terms of business school.  She said this year was going to be competitive, but that every year is definitely competitive as well.  The application this year should be the same as if I was applying last year, or next year.  People should put their best foot forward, and ensure that they have as much covered as possible.</p>
<p>Another thing I mentioned is that I have a great job, and it was almost more risky to leave it for business school than it would be to stay in these &#8220;economic times.&#8221;  I believe my job now is pretty secure, and I, nor do people I work for, see it going away.  I was actually told I would be the last engineer laid off in any type of lay off situation.  I additionally have supplemental income through AndPlus Design, so that could hep pay the bills in the event of an emergency.  Although nothing is for certain, I am also confident that I could find a job immediately if I lost mine.</p>
<p>Another interesting thing that Shauna mentioned is that during these application processes each year, they say that the &#8220;tail&#8221; either is bigger or smaller than usual, but the quality of the admitted students stays the same.  What she meant by that was that even though the economy is pushing the applicant pool up in terms of quantity, the quality of these applicants does not necessarily rise (i&#8217;m sure this is true to a certain standard deviation), and that the people who would have been admitted in past years are most likely going to be admitted this year as well.</p>
<p>I&#8217;m going to write soon about a theory we&#8217;ve come to have on business schools and their students&#8217; functions pre- and post- MBA.  We&#8217;re not thinking they are interested in too many financial MBA people, due to the problems that the financial sector is facing.  If I was a business school (Harvard, MIT) interviewing possible students, I would probably want to distance myself from financial applicants, simply because the financial sector has no idea who is going to be able to get jobs in 2 years.  We all know what keeps the rankings of the top schools at the top are exclusivity, matriculation percentage, and percentage of graduates who receive jobs (whether right away or 3 months out of school).  Training managers that want to go into a sector that&#8217;s having so much trouble is bound to drop the percentage of graduates getting great jobs, and therefore drops the school&#8217;s overall rating.</p>
<p>Anyway, I am glad I went and now have a lot more information upon which to act.  It&#8217;s interesting how much this stuff is on my mind and how I am working on this daily.  I dont know what I am going to do when I finish all of the application materials, and finally push that submit button.  I wont know what to do with my free time (but i&#8217;ll find something!).</p>
<p>I plan on exclusively doing MIT Sloan essays this weekend and I&#8217;ll report more when I get a big chunk done.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.milestonedrive.com/reactions-from-the-mit-sloan-admissions-seminar.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>My credit card rate doubled!</title>
		<link>http://www.milestonedrive.com/my-credit-card-rate-doubled.html</link>
		<comments>http://www.milestonedrive.com/my-credit-card-rate-doubled.html#comments</comments>
		<pubDate>Thu, 18 Dec 2008 04:32:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Bad Business]]></category>

		<category><![CDATA[Business Problems]]></category>

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

		<category><![CDATA[Protect Yourself]]></category>

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

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

		<guid isPermaLink="false">http://www.milestonedrive.com/?p=158</guid>
		<description><![CDATA[I have a washington mutual credit card, with a modest credit line.  I admittedly ran into some credit trouble and slow payment times when at college, so I like to keep a bit of a balance on my card, hovering right around 30%.  I have savings with ING Direct, making a pretty decent interest rate.
I [...]]]></description>
			<content:encoded><![CDATA[<p>I have a washington mutual credit card, with a modest credit line.  I admittedly ran into some credit trouble and slow payment times when at college, so I like to keep a bit of a balance on my card, hovering right around 30%.  I have savings with ING Direct, making a pretty decent interest rate.</p>
<p>I am &#8220;ok&#8221; paying interest on the balance, because I have read that it helps my credit rating.  My credit score is all but fixed, I qualified for a pretty great fixed rate a year ago for my home.</p>
<p>I rarely look at my credit card statement, b/c I look at it online daily.  For some reason i glanced at this one and it showed a rate increase of almost 10%!  I went from 8% to 16.99%.  Made me furious, as I&#8217;ve never been late and my credit line stayed consistent.  I never put the &#8220;necessities&#8221; on credit (as I&#8217;ve seen them say they dont like to see), and there was no notification for it.</p>
<p>Anyway, I got a letter in the mail after i requested a reason and explanation, they said that it was due to my balance being too high for one of the past 6 statement dates (even though my balance has never been higher than 40% on this card at any time).</p>
<p>Anyway, I was fine paying them 8%, but not 17%, so, I paid the whole thing off and now they aren&#8217;t making any money off of me.  What a terrible business decision on their part.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.milestonedrive.com/my-credit-card-rate-doubled.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Putting the Economic Bailout in Perspective</title>
		<link>http://www.milestonedrive.com/putting-the-economic-bailout-in-perspective.html</link>
		<comments>http://www.milestonedrive.com/putting-the-economic-bailout-in-perspective.html#comments</comments>
		<pubDate>Wed, 17 Dec 2008 16:56:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Bad Business]]></category>

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

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

		<guid isPermaLink="false">http://www.milestonedrive.com/?p=156</guid>
		<description><![CDATA[I wanted to write about one more thing, today.  What $700 Billion actually means.
In 2006, an estimated 135.5 million americans filed tax returns.  Of those, it&#8217;s estimated that 32% had zero or negative tax liability.  That leaves 90.8 million people filing tax returns with tax liabilities.
Now, I realize that different people pay a different amount [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to write about one more thing, today.  What $700 Billion actually means.</p>
<p>In 2006, an estimated <a href="http://www.taxfoundation.org/research/show/1410.html" target="_blank">135.5 million americans</a> filed tax returns.  Of those, it&#8217;s estimated that 32% had zero or negative tax liability.  That leaves 90.8 million people filing tax returns with tax liabilities.</p>
<p>Now, I realize that different people pay a different amount of taxes, but, averaged across all tax payers, this $700 billion bailout is just under $8,000 per person.</p>
<p>That is a ridiculous number.  The number goes down when you take into consideration corporate taxes paid and such, but it should not go unmentioned that this does not significantly reduce this number to nothing.</p>
<p>I am nothing of an economic genius, for sure.  But, if the problem stemmed from mortgages and defaults on credit cards, why not give this $8,000 (or appropriate number) to the tax payers directly?  Yeah, yeah, some would spend it on tv&#8217;s, and other stuff, but fix that by mandating that the money goes directly to their financial institutions to lighten the burden of their mortgages, either over time or for the next few months.  Who wouldn&#8217;t want a 5 month period of not paying their mortgage, or not paying their credit card bill?</p>
<p>It seems to me that this solution is much better, because the taxpayers are actually *benefitting* from this solution, whereas there is nothing that is benefiting me by bailing out the financial institutions.  The only thing that is maybe good about bailing out the financial institutions is that my home value does not drop to 50%-40% for a liquidation bankruptcy of the banks.  Instead, the banks are held afloat while they keep these houses on the market.  Of course the market&#8217;s saturated and my home value is declining, but the idea of my home value dropping by 50% or more scares the living crap out of me.</p>
<p>I&#8217;m interested in seeing what others are thinking as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.milestonedrive.com/putting-the-economic-bailout-in-perspective.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>More rant on the economic bailout</title>
		<link>http://www.milestonedrive.com/more-rant-on-the-economic-bailout.html</link>
		<comments>http://www.milestonedrive.com/more-rant-on-the-economic-bailout.html#comments</comments>
		<pubDate>Wed, 17 Dec 2008 16:21:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Bad Business]]></category>

		<category><![CDATA[Business Problems]]></category>

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

		<guid isPermaLink="false">http://www.milestonedrive.com/?p=154</guid>
		<description><![CDATA[So, it&#8217;s been a while since they&#8217;ve announced the bailout.  I&#8217;ve calmed down a bit, but still think it is somewhat of another &#8220;middle class gets screwed&#8221; situation.
You have an Harvard Business School alumn with a bank account of $700 billion able to write checks to anyone and everyone he sees fit.  &#8220;Hank&#8221; Paulson is [...]]]></description>
			<content:encoded><![CDATA[<p>So, it&#8217;s been a while since they&#8217;ve announced the bailout.  I&#8217;ve calmed down a bit, but still think it is somewhat of another &#8220;middle class gets screwed&#8221; situation.</p>
<p>You have an <a href="http://en.wikipedia.org/wiki/Henry_Paulson" target="_blank">Harvard Business School alumn</a> with a bank account of <a href="http://en.wikipedia.org/wiki/Emergency_Economic_Stabilization_Act_of_2008" target="_blank">$700 billion</a> able to write checks to anyone and everyone he sees fit.  &#8220;Hank&#8221; Paulson is essentially the most powerful man in the world right now, and will probably be looked at that way for the rest of time.</p>
<p>I have such mixed feelings about this bailout thing.  It really is such a domino effect if you sit back and look at this.  When I took economic courses throughout school, I learned that the <a href="http://en.wikipedia.org/wiki/Federal_funds_rate" target="_blank">federal funds rate</a> and all of this other <a href="http://en.wikipedia.org/wiki/Federal_funds" target="_blank">federal funds borrowing</a> stuff was really a great thing for the economy, providing almost an airbag for when the economy crashes.  But, I read in the Wall Street Journal that this is the first economic slump, recession, etc. that we&#8217;ve ever entered that was actually started by *consumers* instead of businesses. (I&#8217;ll find my source another time if someone challenges me on this fact).</p>
<p>So is the consumer to blame for this downturn?  What else are consumers supposed to do when we see a downturn coming?  <a href="http://en.wikipedia.org/wiki/Keynesian" target="_blank">Keynesian economics</a> tells us that that economic stimulus we saw this year should have at least sparked some sort of spending, but, as we know, it didn&#8217;t.</p>
<p>So, what now?  Obama is talking about <a href="http://www.nytimes.com/2008/11/08/us/politics/08obama.html?n=Top/News/U.S./Series/The%20New%20Team" target="_blank">another stimulus package</a>, to go into effect within this coming month.  If the &#8220;lame duck&#8221; presidential staff cannot make it happen, Obama said it&#8217;s going to be his urgent first priority.  Interesting.  I will never turn down money (the federal government takes too much as it is, in my opinion), but do they really think this is going to turn things around?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.milestonedrive.com/more-rant-on-the-economic-bailout.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>First Kiva.org repayment!</title>
		<link>http://www.milestonedrive.com/first-kivaorg-repayment.html</link>
		<comments>http://www.milestonedrive.com/first-kivaorg-repayment.html#comments</comments>
		<pubDate>Wed, 17 Dec 2008 15:47:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Development]]></category>

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

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

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

		<category><![CDATA[New Business Ventures]]></category>

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

		<guid isPermaLink="false">http://www.milestonedrive.com/?p=152</guid>
		<description><![CDATA[My Aunt Sydney told my mom about this website that is set up as a &#8220;donation&#8221; website, however, it goes one step further.
The donation you make&#8230; gets repaid.  The donation is actually combined with other donations to become a small business loan to entrepreneurs in developing countries.  What a fantastic idea!
Kiva.org allows you to, through [...]]]></description>
			<content:encoded><![CDATA[<p>My Aunt Sydney told my mom about this website that is set up as a &#8220;donation&#8221; website, however, it goes one step further.</p>
<p>The donation you make&#8230; gets repaid.  The donation is actually combined with other donations to become a small business loan to entrepreneurs in developing countries.  What a fantastic idea!</p>
<p><a href="http://www.kiva.org">Kiva.org</a> allows you to, through paypal, make a loan to profiled entrepreneurs.  You not only get to choose who your money goes to, but you get a clear repayment schedule and understand when you are getting your money back.  Now, obviously, business involves some amount of risk, so the loans could go unpaid, but choosing a partner that pays back 100% (or close to it) is one way to mitigate your risk.</p>
<p>The entrepreneur that I loaned money to is named Liz, she owns a town store that sells toilet paper and other home goods.  She used the money to bulk up her inventory, and buy things that her town needs, so that she could expand her offerings to the town.  Her first repayment term of four just came through, 25% loan repaid, on time and right on schedule.  I get to now take that money and lend it elsewhere.</p>
<p>For more information on what Liz is doing, her profile can be found here: <a href="http://www.kiva.org/app.php?page=businesses&amp;action=about&amp;id=66238">Liz&#8217;s Kiva.org Profile</a></p>
<p>I think this is again a fantastic idea.  Instead of giving away your money to charities and not knowing how your money is used, and by the way, never seeing it again, why not use it as a *loan* and see it repaid over time, knowing you helped directly grow or start their own business, so they are no longer reliant on any handouts?</p>
<p>I would think that this type of idea would expand into other sectors as well, loans to kids, students, local businesses, etc.  Adding a website above the lending adds a bit of accountability to the whole process, so maybe it may catch on!</p>
<p>Hopefully you will join the community and start lending money to others as well!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.milestonedrive.com/first-kivaorg-repayment.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Easy POP3 Access with PHP</title>
		<link>http://www.milestonedrive.com/easy-pop3-access-with-php.html</link>
		<comments>http://www.milestonedrive.com/easy-pop3-access-with-php.html#comments</comments>
		<pubDate>Sun, 14 Dec 2008 00:26:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[Side Projects]]></category>

		<guid isPermaLink="false">http://www.milestonedrive.com/?p=142</guid>
		<description><![CDATA[I am working on a system that will automatically check email addresses at a specified interval using CRON on a linux machine.  I have my web server available for just such a task, but there has to be a way to easily access POP3 web servers through PHP, right?
My initial searches didn&#8217;t come up with [...]]]></description>
			<content:encoded><![CDATA[<p>I am working on a system that will automatically check email addresses at a specified interval using CRON on a linux machine.  I have my web server available for just such a task, but there has to be a way to easily access POP3 web servers through PHP, right?</p>
<p>My initial searches didn&#8217;t come up with much.  I couldn&#8217;t find something that was comprehensive, that is, would decipher HTML emails from text emails, and understand the base64 encoding of attachments, much less multiple attachments to the same email.<span id="more-142"></span></p>
<p>So, I did a lot more searching and found a significant amount of information scattered on accessing POP3 mail servers through PHP.  It turns out that PHP has built-in imap functions that can double as POP3 access.  The following code is to be put in &#8220;includes/mohney_pop.php&#8221;.</p>
<pre class="textmate-source">&lt;?php

function get_msg_array($mbox, $mid) {
        $struct = imap_fetchstructure($mbox, $mid);

        $parts = $struct-&gt;parts;
        $i = 0;

        if (!$parts) { /* Simple message, only 1 piece */
          $attachment = array(); /* No attachments */
          $content = imap_body($mbox, $mid);
        } else { /* Complicated message, multiple parts */

          $endwhile = false;

          $stack = array(); /* Stack while parsing message */
          $content = "";    /* Content of message */
          $attachment = array(); /* Attachments */

          while (!$endwhile) {
            if (!$parts[$i]) {
              if (count($stack) &gt; 0) {
                $parts = $stack[count($stack)-1]["p"];
                $i     = $stack[count($stack)-1]["i"] + 1;
                array_pop($stack);
              } else {
                $endwhile = true;
              }
            }

            if (!$endwhile) {
              /* Create message part first (example '1.2.3') */
              $partstring = "";
              foreach ($stack as $s) {
                $partstring .= ($s["i"]+1) . ".";
              }
              $partstring .= ($i+1);

              if (strtoupper($parts[$i]-&gt;disposition) == "ATTACHMENT") { /* Attachment */
                $attachment[] = array("filename" =&gt; $parts[$i]-&gt;parameters[0]-&gt;value,
                                      "filedata" =&gt; imap_fetchbody($mbox, $mid, $partstring));
              } elseif (strtoupper($parts[$i]-&gt;subtype) == "HTML") {
			  		$content .= imap_fetchbody($mbox, $mid, $partstring);
			  } elseif (strtoupper($parts[$i]-&gt;subtype) == "PLAIN") { /* Message */
                	$content2 .= imap_fetchbody($mbox, $mid, $partstring);
              }
            }

            if ($parts[$i]-&gt;parts) {
              $stack[] = array("p" =&gt; $parts, "i" =&gt; $i);
              $parts = $parts[$i]-&gt;parts;
              $i = 0;
            } else {
              $i++;
            }
          }
        }
		$MC = imap_check($mbox);
		$result = imap_fetch_overview($mbox,"$mid:$mid",0);
		foreach ($result as $overview) {
			$subject = $overview-&gt;subject;
			$date = $overview-&gt;date;
			$from = $overview-&gt;from;
		}
		$result = imap_delete($mbox, "$mid:$mid");
		//$tmp_return = array('ATTACHMENT' =&gt; array(), 'CONTENT' =&gt; '', 'SUBJECT' =&gt; '');
		//$tmp_return['ATTACHMENT'] = array();
		$tmp_return['DATE']			= $date;
		$tmp_return['FROM']			= $from;
		$tmp_return['SUBJECT'] 		= $subject;
		$tmp_return['ATTACHMENT'] 	= $attachment;
		if($content == '')
			$tmp_return['CONTENT'] 	= $content2;
		else
			$tmp_return['CONTENT'] 	= $content;
		return($tmp_return);
	}
?&gt;</pre>
<p>The following code here needs to be put in whatever file you&#8217;ll use to run the script to get mail information<br style="background-color:#FFFFFF" /></p>
<pre class="textmate-source">&lt;?php
	include("includes/mohney_pop.php");
	$user_id = 1;
	$company_id = 1;

	// we gotta figure out who needs to download attachments from email addresses here, and loop around user_id's

	$query = "select server, port, user, password from pop_servers where user_id = ".$user_id.";";
	$result = mysql_query($query) or die(mysql_error());
	$row = mysql_fetch_row($result);
	$host = "{".$row[0].":".$row[1]."/pop3}";
	$login=$row[2]; //pop3 login
	$password=$row[3]; //pop3 password
	$mbox=imap_open($host,$login,$password);
	$num_messages = imap_num_msg($mbox);
	for($i = 1; $i &lt;= $num_messages; $i++)
	{
		$return = get_msg_array($mbox, $i);
		$num_attachments = count($return['ATTACHMENT']);
		for($ix=0; $ix &lt;$num_attachments; $ix++)
		{
			$file_name = $random_number."_".$random_text.$ix;
			$fp = fopen("files/".$file_name,"w");
			fwrite($fp, base64_decode($return['ATTACHMENT'][$ix]['filedata']));
			fclose($fp);
		}
	}
	$result = imap_expunge($mbox); // this physically deletes the files requested for delete
	imap_close($mbox);
	mysql_close($db);
?&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.milestonedrive.com/easy-pop3-access-with-php.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.344 seconds -->
<!-- Cached page generated by WP-Super-Cache on 2009-01-05 00:27:05 -->
