How to Load Random Flickr Images with PHP

This isn’t rocket science, but I did search Google extensively before building my own script.  Save the script as Random_Flickr_Image.php (or whatever) and reference it in your img tag.  For example, <img src=”/images/Random_Flickr_Image.php”/>.


<?php
$doc = new DOMDocument();
@$doc->loadHTMLFile("http://www.flickr.com/explore/interesting/7days/");
$xpath = new DOMXpath($doc);
if($xpath){
   $url = $xpath->query("//td[@class='Photo']/span/a/@href");

   @$doc->loadHTMLFile("http://www.flickr.com".$url->item(0)->nodeValue);
   $xpath = new DOMXpath($doc);

   if($xpath){
      $url = $xpath->query("//div[@class='photoImgDiv']/img/@src");
      $im = @imagecreatefromjpeg($url->item(0)->nodeValue);
      if($im){
         header('content-type: image/jpeg');
         imagejpeg($im);
      }else
         echo "error";
   }
}
?>

Traffic Generation Part 2 – Social Networking

The term “Social Networking” isn’t necessarily easy to describe. In the context of the web, technically I suppose it could be defined as building and interacting with individuals online. But by this definition, social networking isn’t something recently new. Blogging, forums, IRC could all be considered social networking. Some of these I discussed as traffic generation sources in part 1 of this series about creating backlinks.  But when we think of “Social Networking”, these days that encompases things like Facebook and Twitter.  Perhaps Youtube or Google Wave even (Google wha?). These are the “social networking” sources that I will discuss in this post – part 2 in a series about website traffic generation.

Social Bookmarking

In the last few years, hundreds of “Social Bookmarking” websites have sprung up. Social bookmarking sites are sites that share links to resources which are seen by the thousands of readers of the bookmarking site. Generally users can vote a link up and down. The popularity of the link affects the link’s position in lists of “most viewed”, “most popular, “highest rated” or “most commented on”.

Slashdot and Digg.com were arguably the first sites that did this sort of link submission and ranking.  Furl, Reddit, del.ic.io.us, Newsvine and a host of others have since followed.

On some of these sites, a high ranking link has driven massive amounts of traffic to websites, ultimately bringing down the host web servers. The terms, “Slashdotted“, the “Slashdot effect” and the “Digg effect” were all coined for server outages due to links becoming popular on the respecitve sites.

Using social bookmarking in an attempt to gain website traffic may seem spammy, but you could say the same for any other traffic generation technique outside the scope of basic SEO and ultimately for the vast majority of content publishers and website owners, traffic generation techniques such as exploiting social bookmarking are necessity in order to be competetive.

Compared to the effort involved in social bookmarking, the benefit is indeed minimal. However, there are some tools available to assist in littering the web with your social bookmarks making the process marginally less effortful.  I’ve used a couple, including socialposter and socialmarker.  Both do relatively the same thing – attempting to make the social bookmarking process a tiny bit less painstaking.

Facebook Fan Pages

Facebook is quickly becoming the Web within the Web. Amazingly enough, Already, loads of commercials (from big companies) display their Facebook Fan Page along with their logo. Building a Facebook Fan Page isn’t enough though.  You also need to get people to “Like” it. If you already have a Facebook account, then you can at least start there by “Liking” your own Fan Page. Your friends will probably see that you’ve “Liked” it and there’s a possibility that they may as well.  On your website, include a link to the Fan Page.  People who visit your site may then “Like” the Fan Page and their friends will in turn see the “Like” notification and could possibly “Like” it themselves and the snowball effect continues.

You can also use your Facebook account (or create a new account) to gain fan page “followers”.  You can do this by finding Facebook people with a thousand or more Friends.  Friend them, yourself, and they will likely confirm your friendship.  Anyone with a thousand “Friends” indicates that in reality they just confirm whomever Friends them.  Once you amass a large following, you can post links to your Fan Page, or even better, hook your Twitter feed up to your Facebook profile and Fan Page and whenever you post to Twitter, you create content on your Facebook profile/Fan Page.

Your Fan Page is more or less a gateway to your website. Content is still King, of course, but you want your Fan Page to generate leads and hits to your website (and then hopefully generate a conversion and the sound of coins dropping into your piggy bank).

Facebook recently released the iLike button that can be used with blog posts.  Make sure to add this button to your blog posts.

Twitter

Although I’m fairly certain that 99% of Twitter users are marketers in one form or another, it doesn’t mean that Twitter isn’t a goldmine for targeted website traffic. A key Twitter technique for building up website traffic from scratch is to take advantage of Twitter’s huge visibility. It is incredibly easy to build up a group of Twitter accounts. Use one of the accounts to tweet links (with good descriptions) to your website.  Use the other accounts to “retweet” the tweet.  Use an application such as Twitterel (http://www.twitterel.com) to find Twitter users that have specific interests and therefore could turn into potential leads and follow those individuals.  Comment on their tweets as well.

To make Twitter a successful tool, two way interaction is required. Nobody on Twitter gains followers by making only one way tweets.  You need to engage your community. Make replies often to individuals who share the same interests.

Ultimately to take full advantage of Twitter, you need to build your follower list.  There are many ways to do this, but you’re best off if your follower list is made up of quality targeted individuals (rather than a bunch of other Twitters simply looking for reciprical followers – an odd waste of time imho).  Treat your Twitter account like you would a website. Build up traffic to your Twitter account by placing backlinks to your Twitter profile on various websites – again, forums, blog comments, your websites etc…  Guaranteed that if you make a good comment on a forum or blog post and use your Twitter account as your website, you will get good Twitter followers.

For a quick following on a new account, I recommend the HitFollow service.  You can get an easy 100 followers for free, or for a small fee, get thousands.  No work on your part required.  Note, however, that people who have only 1 or 2 tweets but thousands of followers (and are, themselves, following thousands of tweeps) have a low Twitter clout.  In other words, although you have a huge following, you probably have a low likelihood of getting website hits from Twitter posts.

Something else that Twitter has that is waiting to be taken advantage of is the vast number of Twitter supplemental websites.  TwitPic, for example, has a huge amount of visibility.  Place an interesting pic on TwitPic (or any of the Twitter photo uploading sites) and you’re bound to get followers and a high number of views.  The associated tweets are also a goldmine for targeted website hits.

Youtube

Youtube can be a great resource for targeted website traffic.  Create an account, upload some clips.  Customize your channel so that it looks semi-professional with a custom background.  Make sure that you have an interesting avatar or profile pic (this is huge).  Also make sure that the thumbnail for your videos is an interesting part of the video clip.

Ultimately, the quality of your presentation is only half the activity of Youtube.  The other half is attracting subscribers, friends and hits.  Make loads of comments on related video content.  Subscribe to other related channels and Friend the users as well.  Making video responses to related content that receives high view counts is also gold for getting channel and profile views and increasing your Youtube subscriber count. All of this is work that results in more views on your own Youtube channel or profile.  Make sure that your website link is visible on your channel and profile in order to turn those views into website hits and leads.

This was part 2 in my Website Traffic Generation series of articles.  Stay tuned for part 3 where I will discuss traffic generation through widget or app creation.

Putting it on the Line

In an odd twist of time management, I caught the TV show, “America’s Got Talent” last night.  I didn’t necessarily intend to tune in.  Just happened to be in the right place at the right time, for lack of a better expression (what I mean is that I was on the couch at 9pm EST with the TV on, mindlessly flipping channels).

The show was currently in the final stage of choosing the top 48 contestants to go on to Hollywood. I was actually really impressed with some of the talent, but what really caught my attention is the passion and drive that many of the contestants have.  More often than not, their emotions seemed to be on overdrive, like they were literally putting their lives on the line.

One act, in particular, really drew me in. Jeremy does mountain bike tricks – hops and stalls and stuff.  His first audition of small bike hops over people lying on the ground impressed the judges enough to send him on to Vegas for audition number 2.  But doing the same routine again in the second audition probably wouldn’t have been enough to propel him to the top of his category.  He knew he needed to up his game.  So Jeremy decides to jump two feet in. He quits his job and goes broke building a better obstacle course for the stage.  He gives up everything to focus on training for his next audition, in an attempt to make it to the top of a talent show with what is little more than a novelty act!!

Jeremy has a determination that I will possibly never know.

What he does that many of us fail to do is to not only dream, not only set a goal, but to actually put things on the line to reach that goal, and take action, full bore, in a big way.  He knows that if he fails, he has no money or job to go back to.  Despite everything that he pours into his act, he knows that he’s up against big competition and there’s a good chance that he won’t be put through to the finals.  He knows this but there’s no questioning him – he is dead serious – he is going for it.

It made me realize that some of the things I want in life I probably will not achieve, or succeed as well as I could if I were only willing to put the necessary things on the line – take the risks; realize that some of the things that I would otherwise see as a means to an end are also possibly obstacles in the way of me attaining some of my dreams.

Random Flickr Image Slider Puzzle Using Canvas Tags




I put this together a couple of months ago, with the intention to do something else with it, but I haven’t. So I’m just going to publish in this here blog.

It’s a slider puzzle game thingy done with a bunch of HTML5 canvas tags and some seriously hard to follow javascript. It uses random images from Flickr (taken real-time from the recent interesting pictures page). I wanted to provide creds for all the photographers, as I should, but alas I am too unmotivated to take that piece on.

Have fun.

Personally, I have yet to solve a puzzle.

Link to PHP Code to load random Flickr images.

Traffic Generation Part 1 – Backlinks

This is the first article in a series about website traffic generation techniques.

If you’re reading this, you are probably well aware that backlinks are one of the best techniques to increase traffic to your website. The more links from other websites to yours, the higher Google (or other search engines) will rank your website. Also, if your link is strategically placed, people will click on it. Fortunately many (if not all) of ways to create backlinks to your website are completely free (speaking in financial terms, of course – it does take lots of time and effort). In this first part of my traffic generation article series, I’m going to cover a few key ways to create backlinks to your website.

Blog Comments

Making comments on blogs was at one point a great way to create massive numbers of backlinks that search engines like Google would see and therfore increase your google rating. Simply make a bunch of comment posts on various websites and include your link (without being overly spamy). However, most blogging applications these days (like WordPress) tag links embedded in comments with the “nofollow” attribute and as such, most comment links will do relatively nothing to increase your search ranking. There are blogs out there, however, that do not include the “nofollow” attribute on comment links.
Here’s the approach that I use to find quality blogs that don’t have “nofollow” links on their comments: First find a competing website.

The easiest way to do this is to simply search for your keywords in Google and pick off the top few sites. I find it best to use blogsearch.google.com so that your results are all blogs. The sites at or near the top of the list will have many backlinks to them. Use an application like Open Link Explorer from seomoz.org to see what kind of backlinks exist for those sites. If you’re looking to compete in search rankings with top sites, you need to aim for a similar number of backlinks from similar quality sites.

Links in comments aren’t only good for SEO. Strategically placing links in comments on targeted pages that have high volumes of traffec will get you lots of direct traffic as well. It’s amazing how much traffic I see from other blogs simply because of this reason – people see my comment in a post on some other site and then click on my link and end up on my site. The key is to be subtle however. You don’t want the blog owner to see a blatant marketing attempt and delete your comment. The best links tend to be from related content as well. So if I write a blog post on my site about interval training, for example, I’d make sure to comment on blog articles covering the same topic. “Hey, great article! I have trouble keeping track of interval sprints too. I have to agree that they are fantastic for metabolic training. There’s a great interval timer available for your iPhone at…”

Another suggestion with respect to commenting on other blogs to increase traffic – use an form auto fill plugin on your web browser. I use Firefox and the “Autofill Forms” addon. You can create profiles and define specific rules for them. So if I’m commenting on sites for iPad backgrounds and want to backlink to my iPad backgrounds website, I have a profile ready to go with some pre-written content for the comment text area and my link, name and contact info for those fields. Click the autofill button and 90% of the comment is done.

Forum Posts

Forum posts are virtually the same tactic as making blog comments. Typically for any topic you write about, there will be forums already available online, where people regularly go and read and contribute to. I find that if I place a bunch of posts strategically on these forums, with decent comments (again without being spammy), I can get a load of visitors from the forums and typically the links are follow links which are a bonus for search engine ranking.

The key is to find forums that have topics related to your website which also allow hyper-links in your signature. Register and create a profile on the forum. Use a good avatar. This is huge! If you use a default avatar, people are more likely to skip your post – you lose possible readers and possible conversions. You also want an avatar that is interesting, which will increase the attractiveness of your forum posts – make people stop while scrolling through a forum thread and say, “hey – wtf?” And just like posting blog comments, be subtle about your intention (to generate traffic back to your website). Post relevant and interesting replies. Post additional questions. You know your material since you write about it, so play the role of the expert. Expect some criticism from other forum members. In many forums there are posters that read and post religiously. They like to pick on newbies. Also, make sure to read the rules in sticky topics as you could unintentionally make a thread reply that is against the forum rules and face potential banning from the forum.

Top Lists and Link Exchanges

Here’s a great google search: “add link” OR “add site” OR “link exchange” “”

It will return a list of websites that should allow you to submit your link, to be listed on their site, usually in exchange for a listing of their site on yours. This is called reciprocal linking. Quid pro quo. “I’ll list yours if you list mine”. There are literally thousands of link lists for any topic out there. Unfortunately many of those list sites aren’t necessarily high ranking and as such will add little to your own link rating, but it’s free, easy low hanging fruit.

Taking a step beyond top lists and automated link exchanges is setting up link exchanges manually with website owners of higher PR sites. Again, using Google, find the sites that top the searches for keywords that you’re using. Find an eligible site that’s high in the list. Then look to see if they have a contact form or something. All good sites (your site too) should have a contact form. Contact them through that. If they don’t have a contact form, you can bet on the website using a catch-all email address in which case you can send an email to “something”@websitename.com or whatever. Suppose the website I want to setup a link exchange with is www.website.com. I could try to send an email to admin@website.com, webmaster@website.com, contact@website.com and see what happens.

Regardless if you go the contact form or email route, always let them know that they have a great website and that you would be interested in a link exchange. Give them your website details and ask them to reply either way. I’ve also tried putting their link up before sending the request and letting them know that “Hey – you have a fantastic website! I’ve added link to blahblah.com from my website yadayada.com. My site is a high ranking site about yadayada and will likely provide you with some extra traffic as well as increase your traffic rating. Would you be able to add a link back to yadayada.com from your website? Let me know either way. Thanks!”

Setting up link exchanges manually is a hit or miss kind of thing. Out of 20 requests you might only get a couple that will oblige. But these websites may have higher value to Google or other search engines and a link from them might be worth 20 links from other sites. So the work definitely pays off.

Article Writing

Imagine you could put some of your best content on a high ranking website and include links back to your website in the article. Well you can. In the last few years a load of websites have been created that let so called “experts” write articles for their massive article database. These sites typically have good search ranking. Write good, related content (that isn’t a copy of something you already wrote on your website). Include a couple of links back to your website in the article. Distribute it to some of the top article sites such as Ezine Articles or Squidoo.

These are just a few ways of creating backlinks to your website. But I guarantee you that any site that sits higher than yours in a google search uses techniques such as these. So why aren’t you??

In part 2 of this series, I will look at exploiting social networking for website traffic.
Part 3 will continue with the social networking theme and discuss traffic generation through widget or app creation.
Part 4 will examine paid traffic generation – Adsense, Facebook ads and skimmed traffic included.
Finally, part 4 will look more at some blackhat type traffic generation techniques.