November, 2009


27
Nov 09

Increase Your Twitter Following Using Your WordPress Blog

twitter_bird

Download TwitPop Now

TwitPop is a WordPress plugin I wrote with one goal…To make you more popular on Twitter. There are sites that spring up from time to time claiming to get you more followers on Twitter if you follow X amount of people on the follow train. Well, now you can create your own Twitter train on your wordpress blog and really get more followers.

The best part is, you add your username in the admin panel and EVERYONE FOLLOWS YOU! Think of the possibilities… You could be a Twitlebrity.

To add to the excitement, everyone that uses your TwitPop plugin will Tweet a link back to your blog. This promotes your blog as well as your Twitter account. Check out how TwitPop works below.

Instructions

Log in to your Twitter account below.  You will automatically follow the people that have visited this page before you (no more than 20).

Then, your Twitter username will be added to the list and you will be followed by the next 20 people to use this plugin.

[twitpop]

Download TwitPop Now


25
Nov 09

First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack.

George Carrette [1990].


16
Nov 09

PHP Class To Interface With Many URL Shortening Services

With the explosion of Twitter and such services, the need to have long URLs shortened has drastically increased.  Naturally, many services to shorten URLs have sprung up as well.

Most of these services (that are worth using), have some sort of API that will allow developers to send a long URL to them, have it shortened and then returned.  This type of service allows other developers to write applications that have the ability to shorten URLs right inside of them.

Recently, I had to write a PHP class to work with URL shorteners.  So, I made it support multiple shortening services and have decided to share it with you.

The class is called URLShortener.class.php and it supports the following shortening services:

  • j.mp (bit.ly)
  • tr.im
  • TinyURL
  • is.gd
  • u.nu
  • Linkyy
  • Your own custom shortening service

Here are some examples of how to use the class in your own applications:

<?php
	 /* Basic: */
	 $s = new URLShortener('tr.im');
	 echo $s->shorten("http://brandontreb.com");
 
	 /* Using API Key and Login */
	 $s = new URLShortener('j.mp');
	 $s->login = 'brandontreb';
	 $s->APIKey = 'R_2a413ebd15254a72b500ec2ce83f982d';
	 echo $s->shorten("http://brandontreb.com");
 
	 /* Custom URL */
	 // Just make sure you put %s and it will be 
	 // replaced with the long URL
	 $s = new URLShortener('custom',
		'http://b1t.me/api/shorten.xml/%s');
	 echo $s->shorten("http://brandontreb.com",false);
?>

You may download my URLShortener PHP class here.

Feel free to leave any questions or comments in the comments section.


13
Nov 09

Programming

99% of students that were in my CS degree program

99% of students that were in my CS degree program

Image taken from abtrusegoose


13
Nov 09

$13 Dollar Discount On Programming Books From Manning Publishing

manning-logo

The publishing that I’m writing the book for is having a huge Friday the 13th sale.  They are offering a $13 discount on all of their books.  For those of you who don’t know, Manning publishes all of the “In Action” books.

All you have to do is go to the site and enter the coupon code:

fri13

when checking out and you will get the discount.  Although my book iPhone In Action 2nd Edition hasn’t been released yet, Manning has some other killer programming books for sale.

So be sure to check it out!


12
Nov 09

Money You Might Be Missing Out On – LinkShare API Integration

logo

As you may know, I am the developer of the site FreshApps.com.  One thing we had been doing to make some extra money is to use Linkshare to be an affiliate for Apple.

If you don’t know, Linkshare is a service that allows you to become an affiliate of thousands of companies.  You simply select one of the companies products, get the linkshare link, and put the link on your site.  Now, every time someone clicks that link and makes a purchase, you will get a percentage of the revenue.

The Problem

The only problem was, we have thousands of apps and converting the links manually seemed like such a daunting process. So, as you can imagine we converted around 10 links and never looked at it again.

Well, earlier today, the designer of the site JJ Mancini, asked me to check and see if linkshare had an API.  I checked it out and sure enough, they did and it was no more complex than interfacing with a URL shortening service.  So, I wrote the script and within minutes, all of our downloads links were converted into something that can now make us some revenue.

The Solution

Now that I have created the script, I figured I would pretty it up and share it with you.  Keep in mind, the script is stupid easy, so if I am insulting your intelligence by showing it, I apologize.

<?php
	/* linkshare.php */
 
	// Your linkshare API token
	$token = "89705XXXXd11ab28ae548bXXXX4ad6475279faXXXX65da0ec8ed77XXXXeb067";
	// Apples Merchant ID
	$mid   = "13508";
 
	$linkShareLinks = array();	
 
	// I assume links in an array of links to the app store
	foreach($links as $link) {
		$linkShareURL = "http://feed.linksynergy.com/createcustomlink.shtml?".
			"token=$token&mid=$mid&murl=$link&mt=8&buylink=yes";
		$linkShareReturn = file_get_contents($linkShareURL);
 
		if(stristr($linkShareReturn, "click.linksynergy.com")) {
			array_push($linkShareLinks,$linkShareReturn);
		} 
	}
 
	print_r($linkShareLinks);
?>

And that’s it! The variable $linkShareLinks will now contain all of the App Store links converted to your account’s linkshare url. If you have any site with that contains ads for apps in the app store (review site, developer blog, etc…), you would be crazy not to integrate with linkshare.

Give it a try, and feel free to ask questions in the comments section.


11
Nov 09

iPhone In Action Book – Free Chapter Downloads

Trebitowski-iPhone-2E-1-1

iPhone In Action 2nd Edition

Manning Publishing has started their MEAP (Manning Early Access Program) for the book I am working on.  What this means for you is FREE DOWNLOADS.  There is currently only one chapter available, but there will be more as the book progresses.

The chapter currently available is about audio recording and playback.  It goes into detail about the AVAudio frameworks as well as the MPMediaPlayer.

So be sure to check it out and feedback on the chapter is GREATLY appreciated.

Link to MEAP


11
Nov 09

Object-oriented programming is an exceptionally bad idea which could only have originated in California.

Edsger Dijkstra


10
Nov 09

Was Jesus A Real Person? Great Article On Digg Today

The culture of Digg is generally very liberal (to say the least).  That is why I was very surprised to find one of the top stories of the day entitled “Was Jesus A Real Person?“.  Obviously, the comments section of the article was full of people arguing about the matter.

I found the article to be quite well written and made a stellar case for the existence of Jesus.  So whether you are a believer or not, you should check it out.  Take a look for yourself and let me know what you think.

Article Link


10
Nov 09

New Alice in Wonderland Poster Is Sweet

Very stoked for this movie. Photo source ign