Category Archives: Programming

Amazon Simple Store in PHP with Mandatory Signed Requests

Several years ago I used Amazon software for a lot of sites. But after they changed their authentication there was a lack of documentation and I lost interest in trying to fix the old code. I kept going back to their site and forums to see if anyone had ever fixed their Simple Store example which was an excellent spring board into understanding the code. Unfortunately there was never a resolution, and the last comment on the product page was from July 2010 stating that it still does not work.

For some unknown reason this product came back into my vision over the past weekend and the pieces fell into place to resolve the problems.

So I have modified the original and fixed the problem with the mandatory signed request.

A working copy can be seen at CyberCoder Amazon Store

It can be downloaded from Amazon Simple Store in PHP with Mandatory Signed Requests , I do charge a $9.95 fee to download from my site. And yes, I know, everything should be free, but some of us have to make an income from our work.

 

 

 

Add Author to RSS Feed in WordPress

If you have multiple authors on a WordPress blog you may want to add the Author name to the RSS feed title.

Although the standard RSS feed file in WordPress contains the author if you view the RSS feed you will not be able to see the Author name through standard readers as it is not converted.

A good example is to look at a WordPress feed that uses Google Reader and you will not see the Author listed.

One solution of course is to change the WordPress Feed files, however, if you do this every time you update WordPress your change will get written over. The easier and better solution is to add the small snippet of code below to your WordPress Themes function file.

 

function wp_titlerss($content) {
global $wp_query;
$content = $content." by ".get_the_author();
return $content;
}

add_filter('the_title_rss', 'wp_titlerss');

 

 

Being a Website Mechanic

It is a niche I really did not plan on, but it is probably the best description of what I do on a daily basis. Thanks to the SoloBizCoach for pointing that out during one of our chats.

Using the term mechanic invariably brings to mind a car mechanic, and a website mechanic is very similar. If you want your car to look better you take it to a body shop, but if you want it to run better, tune it up, or fix something you take it to a mechanic. And that is the same situation here. If you want graphics or a slick looking website, I should not be your first choice to help you. However, if something is not working right, or you want to tune it up, I can usually help you.

In just the last week I have converted a couple of static sites to WordPress, repaired a slow loading blog, fixed a site that was not loading properly and several other small “mechanic” tasks for others. I also do a lot of custom stuff. Here is a good post from WayneJohn explaining some Twitter API work we were both involved in.

Remember, there is nothing wrong with needing help. A lot of the people who call on me are excellent bloggers and designers, but we each have our skill set and we need to know our limitations. Trust me, if I want some hot graphics I am going to call on someone else to help me out.

A key to success is being able to know when you need help and utilize other peoples skills to advance your work.

Your Own Branded Twitter Interface

Did you know you can build your own custom Twitter interface?

Since Twitter changed to 100% OAuth support you are now required to have a Twitter Application to post to Twitter. This can be seen with how a lot of the WordPress plugins work, which now require you to setup an application and save your OAuth keys so that they can post to Twitter.

You can do the same thing in a stand alone application and add functionality specific to your needs.

There are several benefits including but not limited to, having your link and name appear at the bottom of each Tweet as seen below.

You can also write custom routines to help you issue better Tweets.

I did this on my own Twitter App page with my Follow Friday Tweets.

I always hated the FollowFriday Tweets that are just several links to other people with no explanation of why I would want to follow them. So I built a routine where I can input the persons Twitter name, a reason to follow them and the result will always be the same formatted Tweet.

Each Tweet has the #FollowFriday hashtag followed by the referenced account and an explanation as to why I recommend them, and finally the #ff hastag to end the Tweet.

I also included several other features to make Twitter easier. I have a regular post box where I can write a Tweet and I created a Javascript bookmark for auto posting.

When I am on any web page I click Auto Post, and a Tweet is created and sent that has the Title of the page as the body of the Tweet, and a shortened link is included to the page. And of course they are branded with my link for each Tweet.

If you have a little time and programming help, I would highly recommend using a custom branded Twitter strategy.

Think outside the box!

Every little bit of exposure and linking helps !

Tracking Live Incoming Search Terms

Thinking about all the instant stuff we have on the net I thought it would interesting to watch incoming traffic generated from search engines. I setup a script on a couple test sites that email me the Domain, Search Term, Search Engine and Landing Page whenever a visitor comes from a search engine.

With over 80 sites generating traffic there is no way I could do this on all my sites, but it is interesting and helpful to run on sites where I am trying to get a better feel for the incoming search traffic on a real time basis. I also dump the results to a file to review later, which would be easy to adapt for other things utilizing a database.

Doing a quick search I found this article with a complete tutorial that outlines doing the same. Search Terms Extractor : Statistics and Demographics