How to get the mime type of a remote file in php (with redirects)

Just in case it’s of any use to anyone else out there, here’s a function that can get the mime type of a remote file. It will also follow any redirects that are in place.

function get_url_mime_type($url)
{

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_exec($ch);
return curl_getinfo($ch, CURLINFO_CONTENT_TYPE);

}

How To Make Twitter Work For You In 5 Minutes A Day

When I first started hearing about Twitter over a year ago I wasn’t sure what all the fuss was about. Now, a year later, I understand exactly what all the fuss is about!

Twitter is a genuinely awesome tool to help you grow your business and your personal network, and when paired with resources like direct tax compliance services, it can also help you navigate the financial aspects of your business. You also have the option to buy ig followers cheap if you want to promote your business on your Instagram page.

By participating in Twitter for 5 minutes a day I have seen the following benefits within one year:

  • I found an awesome business partner who is co-founder of my new start-up and who may know of details like the nebraska llc fees
  • I raised awareness of my start-up Pluggio and made $12,000 revenue as a result
  • I asked many questions about things I was struggling with and instantly got excellent answers
  • I asked if anyone needed a contractor with my skill-set and instantly got a job
  • I drove hundreds of users to the weekly tech podcast that I co-host (TechZing)

Getting Started

When embarking on my Twitter journey I decided on a few important rules from the outset:

  • I didn’t want to spend more than 5 minutes a day using Twitter (I have so much other important stuff to do)
  • I didn’t want to use any kind of spammy Twitter “bot” to grow my following
  • I only wanted to connect with people into the same things as me (in my case tech & programming)
  • I didn’t want to spam my followers. I only wanted to Tweet useful information

How I Did It (in 2 easy steps)

  1. On a daily basis, I searched Twitter for people into the same thing as me (and followed them)
  2. Every day (without fail) at regular intervals throughout the day I Tweeted things my followers found interesting

On a daily basis, I searched Twitter for people into the same thing as me (and followed them)

There is a convention on Twitter that people use called Tagging. If someone wants to tag a tweet they will type # and then the tag. For example – #britneyspears – (it’s always just one word, no spaces).

I found the best way to search for people is by using single word tags. Then I could be sure that I was targeting the right type of person. I used search keywords like:

  • #css
  • #html
  • #java

I know the only people who will tag a tweet with any of those terms are programmers and techies, people like me! So, on a daily basis I searched twitter using those keywords, and when I found people that looked interesting I followed them. Then, I hoped they would think I look interesting, and follow me back. It’s a simple yet effective strategy—much like how creators optimize their content for engagement, as seen in viral successes highlighted by The Marketing Heaven.

That is how I grew my highly relevant and valuable following, and it’s a strategy that can be enhanced with tools like the SMM Panel TikTok to further broaden your social media reach and engagement.

Once I had converted a follower I needed to convince them they had made the right decision to follow me. I needed to show them that I was worth listening to and connecting with. Otherwise they would un-follow me and  certainly not take note of my recommendations or mentions about Pluggio or TechZing.

Every day (without fail) at regular intervals throughout the day I Tweeted things my followers found interesting

Interesting Tweets can take a few different forms:

  • Tweet something funny or informational that you think of
  • Tweet a link to something funny or informational that you created
  • Tweet a link to something funny or informational that someone else created

I decided to go with option 3. Options 1 & 2 just seemed like sooo much work!

So, every day, first thing in the morning I scoured all my favorite news websites Digg, HackerNews, TechCrunch, etc. and found 10 interesting articles that I knew my followers would also find interesting. I copy and pasted the links and titles into a text file, shortened the links, then pasted 10 Tweets into Twitter.

Too many Tweets in one go

This was almost the right strategy and my followers definitely appreciated the great content, but it didn’t take long to find out that no amount of great content would make up for how annoying it is to get 10 tweets in a row from the same person…

So, I changed my strategy. I still scoured and found 10 great articles first thing in the morning but now I made a new commitment to only Tweet one story every hour.

At this point my daily routine became:

  • First thing in the morning find 10 awesome articles, shorten links, store them in a text file for later Tweeting
  • Login to Twitter every hour:
    • Tweet a story
    • Search twitter for new folks to follow
    • Answer Tweets that people sent my way

The great news was that I had discovered a process that fulfilled nearly all of my goals. My following was growing rapidly. I was striking up new friendships with folks who were into the same thing as me. I was beginning to see how important Twitter could become to me.

The not so great news was that my hourly Twitter logins took a huge toll on my productivity.

I didn’t want to spend more than 5 minutes a day using Twitter (I have so much other important stuff to do)

By this stage I knew that what I was doing was not spammy and was percieved as valuable by many of my followers (about 1500 at this point). I was regularly being thanked, re-tweeted and also on many peoples #FollowFriday lists.

Even so, I couldn’t help thinking how much time I was wasting. Almost everything I was doing could be done by software. That’s when I decided to use my programming skills to build  software that refined the above process into a 5 minutes a day session.

5 Minutes A Day!

I created software that did all of the above (apart from the link curating). Then a few friends asked if they could get access so I made a semi-public version. Then finally gave in and release it into the wild. At first I called it TweetMiner, then I changed the name to Pluggio. I’ve been using it for 5 minutes a day to grow and maintain my following ever since. All the benefits I’ve seen have been through this daily 5 minute routine.

You can get the exact same effect without using Pluggio. Just follow the process outlined above. It will take more than 5 minutes a day but it’s well worth it!

If you do decide to get a bit more serious and use a productivity tool like Pluggio I thought it would help for me to outline the daily process I use and show how Pluggio helps with each aspect:

Conclusion

At first glance the value of Twitter is not obviously apparent. It can even seem like it might be a waste of time and a bit silly. However, I hope with this article I’ve helped to show that Twitter is worth pursuing from both a business and personal perspective.

For me, the 5 minute a day investment I have made during the past year has returned huge big benefits – from helping me meet awesome people in the same space as myself – to helping me spread the word about my podcast and start-up.

If you would like to find out more about Pluggio (the tool I made) click here.

How to Start a Sucessful Bootstrapped Web App Business

After recording 87 episodes of TechZing it occurred to me that we now have a goldmine of audio information about how to start a successful bootstrapped web app business. I’ve assembled our best shows on the subject into an 12 hour audio seminar!

What surprised me looking back through the archive was how much variety there is in what our guests actually built. Some run small SaaS apps for niche professional audiences. Others built content and review sites that quietly print money in evergreen verticals — web hosting comparisons, software roundups, even sites ranking the best online casinos for players outside the US. Once you strip away the surface differences, almost every successful guest followed the same handful of principles.

If you are really serious about going out on  your own, leaving your day job, and starting your very own successful web app business you owe it to yourself to listen. Each show is an interview with a guest about their successful business. As they tell their story each entrepreneur teaches us valuable lessons. I’ve grouped shows into over arching themes to make them easy to navigate.

Deciding on an Idea

If you’re just starting out and need to decide what your new business will be these shows have some very useful information. Also check out the Patrick Mckenzie interview in the marketing section.

Rob Walling / The Micropreneur Academy

Thomas Thurston / Modeling Disruption

Building Your Idea

One of the reasons why web apps fail is because they look bad and are difficult to use. This interview with Luke can help you build a product that is more likely to be successful because of a better UI.

Luke Wroblewski / The User Interface Is The Product

Launching & Marketing Your Idea

Once you’ve built your app you need to start bringing in customers. These interviews have lots of information about how to go about that! You may also work with a PE SaaS marketing agency to establish an online presence and reach your target audience.

Patrick McKenzie / The Long Tail of Optimization

Gabriel Weinberg / DuckDuckGo

Peldi / Balsamiq Mockups

Turning Your Idea Into a $1m+ Business

Once your app is turning over a few thousand dollars a month you might want to think about turning it into a larger business. Here’s two interviews with entrepreneurs who did exactly that, and share their lessons learned.

Central Desktop / Relentless Execution

Jason Cohen / Smart Bear Software

What To Do After You’ve Made Millions

Once you’ve built a company and sold it for more than $20 million what do you do? Derek Sivers muses on this question with us in this excellent interview.

Derek Sivers / The Sivers Effect

82: TZ Interview – Patrick Foley

[audio:http://traffic.libsyn.com/techzing/techzing-082.mp3]

Justin and Jason interview guest Patrick Foley, host of the Startup Success Podcast, about his background as a software developer and his love of startups, why and how he got started as a podcaster, his role as a Microsoft ISV Architect Evangelist, Jason Cohen’s new startup WP Engine, the benefits of Azure as a scalable web platform and the power of the story in conveying ideas and understanding.

The Madness, The All Consuming Obsession Of New Projects

Something that non-entrepreneurs rarely understand is “The Madness”. It’s the obsession that fills our every waking thought. Like 28 days later “The Madness” is an all consuming rage.

It comes into our life just after THAT Eureka moment. The one when we realize we’ve stumbled upon an idea so big that we KNOW it will make us unimaginably wealthy. This idea will bring us respect. We will be hallowed as the new Gates, Brin, Page or Zuckerberg.

When “The Madness” sets in, romantic candle light dinners break down. As our loved one looks us in the eye and whispers sweet nothings, we try to hide the fact that we’re thinking about scaling Couch DB on the Amazon cloud. We might be completely zoned out, quietly mapping out a fraud-detection protocol capable of handling traffic for heavy-load clients like global logistics firms and online casinos. The physical world simply fades away, replaced entirely by architecture diagrams and database schemas.

Then start the late nights as we obsessively code our new baby into existence. Along with the distance between us and the rest of the world. Later and later to bed we go, until two weeks into “The Madness” our hours are topsy-turvy. We’re sleeping from 4AM -> 10AM. Living off Coke and Starbucks.

There’s only one way out of “The Madness”.

We have to think our idea through from every possible angle. We have to imagine every tiny twist of it. We have to gorge on it until we are full. We have to become disgusted and completely bored with our idea.

Then, and only then, can we come back to reality. To our friends, and to our partners.

Such is “The Madness”.

Happy Halloween

The great thing about spending Halloween with your friends and family is that they make jack-o-lantern based on your head.

The artist of this pumpkin also created Alphabet Anarchy

81: TZ Panel – Pete Michaud & Rob Walling

[audio:http://traffic.libsyn.com/techzing/techzing-081.mp3]

Justin and Jason host return guests and show favorites Pete Michaud and Rob Walling for an experimental panel episode. Some of the topics discussed include scaling via automation, finding and managing freelancers, building a content business vs a software business, Pete’s Goal Mapping web app, the obsession of a new project (The Madness), the relative strengths of blogging and podcasting, the format of Rob’s podcast Startups for the Rest of Us and the value of growing an audience.

80: TZ Discussion – Get That Monkey!

[audio:http://traffic.libsyn.com/techzing/techzing-080.mp3]

Justin and Jason discuss the successful start of the donation drive, the show’s grand patron Ben Boyter and executive producer Felix Leong, Rob Walling and the Startups for the Rest of Us podcast, why Justin moved Pluggio from Rackspace’s Cloudsites service to a VPS, password hashing and rainbow table attacks, a password strength meter in Javascript, a PHP password hashing framework, developing browser extensions and bookmarklets, the Startup Toolkithow champions push past the pain, avoiding toxic relationships, the new TechStars book Do More Faster, diffing startup advice and Jason’s idea for doing a startup advice cage match series, TwitterCounter and the growth rate of Justin’s Twitter following, why Jason think’s PHP is to Ruby as SF is to LA and some startup naming suggestions.

The “Tiny Software Company” Revolution

There’s a new phenomenon taking hold. This is the era of the “Tiny Software Company”.

Indi-developers are are starting their own “mom-and-pop” software companies all over the world.

And they’re leaving work. And they’re making a full time living.

Peldi started a million dollar industry with one simple Adobe air app. Patrick Mckenzie is making a full time living from his ridiculously nich app Bingo Card Creator. I’ve been pulling in $1000/month for the past year with Pluggio. Taylor Norish makes a great living from PrintFriendly. Pete Michaud became financially free at 25. The list goes on.

So what this all amounts to is…

“If you’re a software developer with an idea… GET OFF YOUR ASS and MAKE IT HAPPEN! There’s never been a better time! ;)”

(p.s. Post links to your projects in the comments below)

78: TZ Discussion – The 360 Degree Resume

[audio:http://traffic.libsyn.com/techzing/techzing-078.mp3]

Justin and Jason discuss the BATF (big ass text file) method of storing information, building a beta email list for AppIgnite, Jason’s new blog Codus Operandi and Justin’s new blog JustinVincent.com, whether Twitter is worth the time and how to build a following when you’re not famous, why Swarm needs to be an everything app and not just an iPad app, why you should display your picture on your blog, using IndieGoGo for fund-raising, whether outsourcing email or tweets is a bad thing, blog posts about TechZing by Udi Mosayev and Karan Vasudeva, a La Critique of CodeBoff.in, a status update on Pluggio and AppIgnite, pricing and marketing possibilities for AppIgnite and why you should start marketing the day you start coding.