| Subcribe via RSS

Programmableweb’s API directory

June 29th, 2010 | No Comments | Posted in me

Really, Really quick update. Last night the Frinly API was added to Programmableweb.com’s API directory. To me this is huge deal because I’m such a big fan of the site. The approval process took a about week or maybe it was two, and I have to admit there where times that I was seriously doubting if it would ever happen. Then last night at dinner, during one of my random email checks, BAM, the acceptance email! Yea that basically made my day, it was pretty Awesome.

Frinly API Screenshot

Frinly API Screenshot

A good Linux PHP Editor?

June 24th, 2010 | No Comments | Posted in me

So I finally got my laptop to a point where I love working on it. It’s now what I would call
“The Ultimate Work Machine”.

Like most computers purchased from large retail chains Vista was pre-installed, along with a whole bunch of other crap ware. I’m not a big fan of Vista, I did like XP. But because of Vista I didn’t really enjoy working on this laptop at all. It quickly became a machine I kept around the TV so I could do quick searches between commercials. Or under the bed so I could get to it quickly if I remembered something before I went to sleep.  I had totally written this computer off.

Then one day while having lunch with a old colleague It dawned on me that most of the SEO tools that I use for analyzing web sites where all browser based (Firefox). Meaning I could basically run all of my favorite plugins while being in a Linux environment (I bet most of you all are like duh, I was too) . And for the applications that where not available in Linux, I was able to find great replacements. Digsby for example is a great IM client but does not have a Linux version yet, so there’s Kopete and Empathy which are great replacements.
FileZilla on the other hand did have a Linux version and I’m happy about that because this is one of my must have application, I use FileZilla a lot.
For opening documents and spreadsheets Open Office can be used to replace Microsoft Office. Open Office is incredible and I can’t believe it’s FREE and comes pre-installed with Linux.

The only thing that I’m missing right now is a good Linux based PHP editor/IDE. I started using PHP designer 7 before I made the switch and really like what it offered. But they don’t have a Linux version right now and I’m not sure if they ever plan to. So I’m currently bouncing between three different editors right now,  Komodo Edit, Geany, and gPHPedit. I’m leaning towards Komodo Edit but there’s this one little thing that I can’t get it to do. I’m sure it’s a lack of knowledge on my part versus the software’s functionality. So for now I figured I will continue testing these three until the end of next month. Hopefully by then I will be at a position to make a decision.

But for now, for the first time I’m enjoying my laptop. It’s the perfect work machine.

The applications and Firefox plugins I have running included:

  • OS – Linux Ubuntu 10.0.04
  • Apache, PHP, MySql, PHPMyAdmin
  • Editors – Komodo Edit, Geany, and gPHPedit
  • FTP Client – FileZilla
  • SSH Client – Putty
  • IM Client – Kopete
  • Browser – Firefox
    • ColorZilla
    • DT Whois
    • Echofon
    • Gmail Button
    • Live PageRank
    • Measureit
    • S3 Firefox Orginizer
    • Screengrab
    • Ubuntu Firefox Modification
    • HttpFox

Kopete

Tags: ,

Make Twitter Updates with PHP and cURL

June 18th, 2010 | No Comments | Posted in API, PHP, Programming

I’m sure I’ve mentioned sometime before that I’m a big fan of Twitter. I think Twitter has done a great job with their API, and the documentation for their API. They’ve made it fairly simple for developers to create Twitter based applications without jumping through a lot of hoops.

Well below is a bit of code I’ve used in the past to make status updates to Twitter. If your familiar with cURL then you’ll see that its pretty straight forward. The end result examines the HTTP code to determine if the status update was successful or failed you can comment this part out if you wish.

But before you go plowing away with the code I think it would be a good idea if you make yourself familiar with their documentation. They have a few rules that could save you some heartache down the road.

== Twitter Documentation ==
http://apiwiki.twitter.com/Twitter-API-Documentation

== PHP Code To Post Twitter Status Updates ==

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?PHP

/* Post Twitter Status Update using PHP & cURL */

function postToTwitter($username,$password,$message){
 
   $username = $username;
   $password = $password;
   $twitterHost = "http://twitter.com/statuses/update.xml";
   $yourStatus = $message;
   $curl;
   
   $curl = curl_init();
   curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 2);
   curl_setopt($curl, CURLOPT_HEADER, false);
   curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
   curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
   curl_setopt($curl, CURLOPT_USERPWD, "$username:$password");
   curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
   curl_setopt($curl, CURLOPT_POSTFIELDS, "status=". urlencode(stripslashes(urldecode($yourStatus))));
   curl_setopt($curl, CURLOPT_URL, $twitterHost);
   
   $result = curl_exec($curl);
   $resultArray = curl_getinfo($curl);
   
   if ($resultArray['http_code'] == 200) {
   
   $twitterPostStatus = "Success";
   
   } else {
   
   $twitterPostStatus = "Failed";
   
   }
   curl_close($curl);
   
 return $twitterPostStatus;  
}

$username = 'username_here';
$password = 'password_here';
$message = "Working with the Twitter API";

$result = postToTwitter($username,$password,$message);

print_r($result);
?>
Tags: , ,

Frinly WordPress Widget

June 17th, 2010 | No Comments | Posted in PHP, Programming, wordpress

Just a really quick update. The Frinly WordPress Widget was accepted into the WordPress Plugin directory a couple of days ago. It is now available there also.
http://wordpress.org/extend/plugins/frinly-photo-sharing-widget/
http://frin.ly/recommend/wordpress/
Later,
Joe

Tags:

Fixed Broken Links

June 12th, 2010 | No Comments | Posted in PHP, Programming

I just noticed I had some broken links on my PHP Scripts page. I repaired the links so the downloads should be back to normal.
I have to say I looked over the code that was used to make this scripts and a lot of it is old. I’m leaving it in place hoping that it can still in some way be helpful.
Later,
Joe

- – UPDATED –
I included two scripts that I had on the old site that somehow was forgotten when I made the move.

Tags: , , ,

Twitter Oauth and Amazon A3

June 7th, 2010 | No Comments | Posted in Programming, wordpress

After about two weeks I’m back. Things took longer then what I expected but I did get a lot accomplished. I totally re-vamped my image hosting site, from a code perspective. Users are now required to have a twitter account to use Frinly. I’m using Twitter Oauth for log in authentication. I also added Amazon A3 service so now all of the images are hosted on Amazon’s servers. I’ve Built a Upload and Post and Post only API so that users can use 3rd party applications to post images. I’ve changed the way incoming email is answered and dumped the script and cron job that checked a designated pop3 account. And last, but not least I upgraded the Frinly WordPress Widget so now you don’t have to hack the code to configure it to work. Now configurations are made through the options interface.

I think I kicked some ass actually. There where a whole bunch of tutorials I had to read to get this done. Two weeks ago I had no idea how Amazons cloud storage worked. Now I’m scratching my head wondering why in the heck haven’t I been using this all along. It’s awesome!

I’m not 100% finished yet. I have a few more features that I would like to add but I’m going to hold off for a couple of weeks before I start on them. I really want to work on this other project I’ve been thinking about for sometime now. I plan to post updates when I can but to be honest I know how I am when It comes to programming. It consumes me.

Overall the best part of buckling down and learning how these services work is the knowledge. I now have to knowledge to build bigger and better applications. So basically you have to look at the time spent as an investment.

Later,

Joe

Tags: ,

Twitter IPhone App – Custom API URL

May 21st, 2010 | No Comments | Posted in API, Programming

Change of plans. I decided to take an opportunity I came across yesterday.Custom API URL - Twitter IPhone App
Let me explain. I subscribe to Tech Crunch via twitter, that’s my way of keeping up with who’s, who’s and the what’s going on in the tech world. Well I saw a post they made yesterday about a new twitter IPhone application that was coming out or maybe it was just being renamed, I can’t remember but you get the idea, right?  So I thought why not give it a try. So I went to the Itunes App store via my IPhone and  downloaded the app. I played around with it for a while and quickly became very happy with the functionality. It had a butt load of options and was totally ad free. For the longest I had been using Echofon which wasn’t.
Any who, one of the features I played around with while testing was the photo posting. Photo posting is probably one of the most important feature for me. I figure I can text my posts in if needed.

So to test this feature out I added a test twitter account to the app and posted a random photo from my IPhone. The photo showed up immediately which is great, but when I took a closer look I realized it posted the image to Yfrog. WTF, I was kind of irritated for a little while and wonder why in the heck would they use that site, I hate that site. So I went back to the app to see if there where other options I could select from that would allow me to change this out. Echofon has that feature, so I assumed they would also. Now hold your hat on what I’m about to tell you next, it’s a shocker. Not only did they have several options to choose from, they also had an option that would allow you to add your own custom API URL. Yea that’s music to my ears. First off I love using API’s and secondly I just so happen to have a image hosting site that posts to Twitter and Facebook. So that was it, I knew my night was on lock. I took a pause for a few minutes and then went straight to Burger King and grabbed a couple of those $1.00 double cheeseburgers, came back to the house and started coding my ass off. I think I went to sleep around 4 am, but had to get back up by 9:00 am, I had some shares of stock that I was trying to dump before the market bottomed out.

So to make a long story short I completed building the API for my site sometime around 5 p.m. today. It took longer than what I expected because the market went running today. If you’re curious I took home an extra 315 bucks today. But I have everything working now. You can now post images to your Frin.ly account from Twitter’s IPhone app. I’m not advertising the API right now because I want to take sometime to revamp the site before I start to let people use it. I was looking at some of the code and some of it didn’t make since to me, and I was the person who wrote it. Go figure.

Anyway I said all of this to say that I’m off track right now and things will probably be pushed back another week or so I think. But I’ll keep you posted.
Later,
Joe

Tags: , ,

New SMS Project in Scope

May 20th, 2010 | No Comments | Posted in Projects, me

I have a new project in mind, it’s SMS based. I’m going to take this weekend to scratch it out on paper before I actually start coding the thing. This is still a new approach for me. On my last project I flow charted everything out before hitting the code and things actually went a tad bit faster. Plus I found that if you don’t have a well documented process before you start then it’s actually harder to determine the projects end date because you will be constantly added bits and pieces or modifying things.
Overall I’m really, really excited because this project will be solving one of my longtime dilemmas. And that’s remembering things. So if I can bust this one out in less then a month that would be incredible. But honestly the coding has never been an issue, it’s the designing, that’s my Achilles heel. I’ve always thought if I could some how team up with a web designer I would kick some major ass. (Please take that as a hint)

Tags: ,

WordPress Transfer Complete

May 19th, 2010 | No Comments | Posted in me, wordpress

Ok, I think I’m now fully transferred over. I won’t BS you it took longer then what I expected. It’s probably because I was being a fast ass and kept making minor mistakes. But basically all I did was pull the posts/data from the database and created a XML file that kind of matched the exported WordPress version. I left out a lot of containers like the categories and tags containers, actually that was another animal in itself. I figured I would create new tags and categories once I had everything imported, hopefully forcing me to create a more organized blog. I did realize another issue after I was done, and that was making sure I didn’t lose much search engine traffic. I expected a drop off in traffic, but I didn’t want it to be a large drop off. So basically I added a few 301 redirects in my .htaccess file and added some code in the header.php file to make sure that the pages where able to flow from the old site to the new site without issue.
So for the most part it, I think I’m done. I have a few minor things to add but the heavy lifting is over.

Tags: ,

WordPress Installed

May 18th, 2010 | No Comments | Posted in wordpress

Ok so I’ve gotten the account setup and finally wordpress is installed. I’ve also found a Theme over at Freethemelayouts.com that I’m happy with. So basically now it’s time to tackle what I believe will be the hard part.  How to import the posts I’ve made on my old blog into my new one.
I’ve taken a look at the XML file and the containers that wordpress includes during their export process.  So I’m guessing all I have to do is a database pull and and create a XML file with the same or similar containers.  Sounds easy enough right,  let’s see.

Tags: ,