Archive for January, 2008

Rotate Your Affiliate Ads With These Simple PHP Scripts

PPC 1 Comment »
If you're new here, you may want to subscribe to the RSS feed. Thank you for visiting SEMSPot!

php randomization script imageThis is the second part to yesterday’s post Blackhat Technique To Hide Your Affiliate Code Behind An Image/Video in regards to rotating your ads randomly on your site. Some of you might be interested in showing different ads on there site without cluttering your website with banner ads. To keep the clutter to a minimum, you can rotate your affiliate ads. If you are looking to rotate different affiliate banner ads or affiliate links then you can copy/past these scripts below to get started in just a few minutes. You can use one of these scripts on every page of your site if you like. The only disadvantage is the viewer will not see all of your affiliate banners, because these only show one at a time. When you refresh the page, you will see other banners. This is a great method if you are trying to use skyscraper banners on your site. Instead of having the entire side of your website filled with them, you can rotate through them. That is one thing that does drive me crazy, a website with very little content and a scrollbar that is a mile long to compensate for the skyscraper ads.

Let’s take a look at the first script, it is short and to the point. There are several ways to randomize your affiliate banners, however this way is very easy to understand for anyone. I could use array’s, but I feel that some readers will feel intimidated by seeing some of the PHP code. This first code is very easy to understand for a beginner, so lets have a look. Just remember to remove the PRE and CODE blocks before using them.

<pre><code>

<?php
$rand = rand(1,2,3,4,5);
if ($rand == 1)
print ‘Affilate script 1′;

elseif ($rand == 2)
print ‘Affiliate script 2′;

if ($rand == 3)
print ‘Affilate script 3′;

if ($rand ==4 )
print ‘Affilate script 4′;

if ($rand ==5 )
print ‘Affilate script 5;
?>
</code>

</pre>

The above script will rotate through 5 different things for you. You could input your affiliate javascript code or IMG and A HREF tags. If you only have 4, then simply remove the last 2 lines of

<pre>

<code>
if ($rand ==5 )
print ‘Affilate script 5;

</code>

</pre>

and change the $rand string to (1,2,3,4) so it knows to only randomize between 4 numbers. What I suggest doing is putting this in a separate file, lets call it random.php and simply use the php include on any page you want it to go on.

<pre>

<code>

<?php include(”http://www.YOURSITENAME.com/random.php”) ?>

</code>

</pre>

So if you have this on 40 pages and you need to make a change to an affiliate, you only need to make the change in the random.php and not on the 40 pages. This saves you a lot of time and makes your job much easier.

Now the second method is a little more complicated and requires a MYSQL database. You will need to create your database and have a minimum of 2 rows. I called the table BANNERS and created 2 rows, url and image. You can create another row for your alt tag if you like, this way every banner that gets rotated with have alt text for each.

This code simply connects to the database of DBNAME, selects all ( * ) from BANNERS and then order’s it by randomly choosing one of the items to display. The “.$row[“url”].” and “.$row[“image”].” are used to select the data from those rows in the database and echo’s them into the url and img tag. You would still put this code in a separate file, like random.php above so you only have to make changes to one single file. This also allows you to use this on multiple websites while only using one database. The only change you would make is the server address, instead of having “localhost” you would put in the direct server address to where the database is stored. So if you have 20 websites and are looking to monetize them with affiliate banner ads, this would be a great solution for you as well.

<pre>

<code>

<?php

mysql_connect(”localhost”,”USERNAME”,”PASSWORD”);
mysql_select_db(”DBNAME”) or die(”Unable to select database”);

$query = “SELECT * FROM BANNERS ORDER BY RAND() LIMIT 0,1″;
$result = mysql_query($query) or die(mysql_error());

mysql_close();
while ($row = mysql_fetch_array($result))
{echo ”
<a href=’http://”.$row[”url”].”‘>
<img src=’http://www.YOURSITENAME.com/images/banners/”.$row[”image”].”‘ alt=”></a>/>
“;}

?>

</code>

</pre>

As stated before, there are several ways to randomize data with PHP so I am sure you could write a shorter code or whatever. Please feel free to post your alterations in the comments below to show the readers other methods of ad rotation besides what I have listed here. I hope this answers question and/or gives you the reader some ideas for ad rotation for your website.

This article was originally written on SEMSpot.com, a Search Engine Marketing Blog.

Blackhat Technique To Hide Your Affiliate Code Behind An Image/Video

Spot On Tuesday 6 Comments »

Before going any further you need to realize that using such a technique, you run the risk of getting your account banned. I do not suggest using this on your major sponsors. If need be, sign up with a new affiliate or two and test it out for yourself.

The concept is simple, we are going to be showing the affiliate image with the size of 300×250. At the same time we will be overlaying our own image or video that is of the same size and hiding the affiliate image behind it. Why do this you might ask? It is easy, you want the people to click on your image or video and think they are going to see more of it. Instead they are clicking on your affiliate think and making you a little bit of money.

Here is a screen shot of the image being fed by the affiliate, in this case I will just use Google to show you.

google-adsence.jpg
Now we have our custom image or video that we would like to use on top of our affiliate link.
blackhat-image-trick.jpg

So now let me show you an easy way to take your own image or video and overlay it on top of your affiliate image. Here is the sample code that can be used to display your affiliate information under an image. You can replace the image with a video as well, just remember to keep the image or video the same size as the ad you are trying to cover up. I also suggest using a rotation script so your CLR is not 100%. I can go over an easy method of rotating you ads with PHP tomorrow. This technique works great for stumbleupon traffic and such, if you truly do have a video though you can always ad a link under the image. This way after they click on the image and see it did not work, they can go back and click on the link “click here if video does not play”. That way they can at least see the video and can help keep the heat turned down a little for you. There is a live link at the bottom of the code block to see this code in action and see how easy it is. Just remember this is against some affiliates TOS and will get your account banned quickly.

<pre>
<code markup=”none”>
<style>
iframe{
opacity: 0;
border: 0px none transparent;
position: absolute;
top: 0px;
left: 0px;
height: 300px;
width: 250px;
filter:alpha(opacity=0);
}

img{
position: absolute;
top: -50px;
left: 0px;
height: 300px;
width: 250px;
}

</style>

<img src=”http://www.semspot.com/wp-content/uploads/2008/01/blackhat-image-trick.jpg” alt=”blackhat image trick”>
<script type=”text/javascript”><!–
google_ad_client = “545″;
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = “300×250_as”;
google_ad_type = “image”;
google_ad_channel = “165464″;
//–></script>

<script type=”text/javascript” src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>
</script>

</code>

You can see a live example of this in action by clicking here.

This article was originally written on SEMSpot.com, a Search Engine Marketing Blog.

If Microsoft Pulled Their Head Out Of There Ass…

Rants Comments Off

Could they compete with Google at this point?  Google owns the search market and MSN is way behind at this point.  Google will be putting there operating system on cell phones in the near future, of course with there Google search feature.  What about there conquest to have free WiFi access?  Why else would they be partnering up with EarthLink the offer this type of service?  You know the default search will be Google.com for anyone using the service. msn has there head in there assmsn has there head in there ass

Imagine what could have been if MSN did in fact buy Yahoo last year.  We all know that Microsoft has some deep pockets, but are they putting there money in the right places?  Do they really care to try and catch up to the Google Giant?  Over at Google they are hiring the greatest computer minds in the world, and they have the bankroll to do it.  MSN has the money as well, however there attempt to launch there new MSN Live did not live up to all of the hype.  The only thing Microsoft has going for them is people who use IE7 (with no plugins) and or have there homepage set to MSN.com.  Now some people who do have there homepage set to MSN might not necessarily use that.  They could have a toolbar installed that uses Google or they just type in Google.com and start there search.

You use Google if

  • You own a brand new computer from dell (Google toolbar/desktop)
  • You have installed the Google toolbar on your own
  • IE7 after installing adobe acrobat, WinZip, java updates
  • You use Firebox browser
  • You use Opera browser
  • Have installed a long list of shareware that auto installs the Google toolbar if you do not uncheck the option

The list above can account for a large number of people in the world.  Could this be a reason why Google stays ahead of Microsoft in the search industry?  Think about the home page for a second, you go to Google and it is very plain and easy to use.  It has there logo and a search box.  Now think about MSN.com, the page is cluttered with all sorts of news, information, flash ads and takes longer to load.  With all of that going on, the not so average computer user might get lost and not know what to do from there.  Instead they head on over to Google and just worry about that empty search box.  Could this be a reason why Google stays ahead of Microsoft in the search industry?

Microsoft does not collect that much data from what users they have.  Google on the other hand collects and saves the data from any search performed, adwords, adsense, Google tool bar uses, firefox searches, and more.  It then takes the data and figures out what they can do to make the users experience a better one.  There were talks about Google geo-targeting there search results based on the IP address of the person.  So if you did a search for “website design” while having your IP based in New York then it would only show you website designers in the New York area.  Google not only thinks ahead, they also plan ahead.  Could this be a reason why Google stays ahead of Microsoft in the search industry?

Microsoft has there Windows OS, Office suite software, there business servers and they 3rd most used search engine in the world.  Google is always growing, they are showing no signs of stopping at this point.  I really think the only thing to knock down the Google giant will be the government to step in and try to break things up just like they did with Microsoft.  It probably wont be this year or next, but it will happen eventually.  Maybe this is what Microsoft is waiting for, when that happens they think they can snatch up the market share?  I highly doubt it, they changes to compete with Google and maybe if they pulled there head out of there ass they might see some sort of light at the end of a long tunnel.  If not then they will never catch Yahoo and sure as hell will never catch up to Google.

Do you think Microsoft, or anyone for that matter can top Google as being the leader in search for 2008 and beyond?

This article was originally written on SEMSpot.com, a Search Engine Marketing Blog.

Why Deciphering The Truth From Speculation In SEM/SEO Is Important

SEM General 11 Comments »

seo truth vs speculation

Whether you are just starting out with search engine marketing or you have been involved with it for years, you need to realize that not everything you read is true. Separating truth from speculation is something that will take time, your own testing, plenty of reading and getting to know other people in the industry. Just because you read something on a forum or a blog, does not mean it is always true. Some people do not look much further past what they have read. Instead they start making changes to there site or marketing campaign based on a single discussion in hopes of it working. Later to find out that it did more harm then good for them. Before making any major changes, participate in the discussion to ask further questions. You need to fully understand what the topic is at hand, realize the good and bad from it. Try and dissect the theory behind what is being talked about before trying to utilize it for your self. By doing this you will not only have a better understanding of what it is you are trying to do, you will be educating yourself further on the subject for future reference. By referencing back to it in the future, you can then start to come up with your own ideas for your marketing efforts.

Realize that in many cases what you read is not the entire story; it is nothing more then a bit of information to start with. Some parts could have been left out on purpose in an effort for that person to have there 15 minutes of fame. What they left out though was probably what makes the technique effective. In some cases what you read is a flat out lie in an effort to deceive people into thinking it really works. It sucks to have to read that last sentence, but it is true. Some search engine marketers will say whatever they think sounds good to throw other people off and even harm there rankings. That is why it is important to follow up more before implementing it to your website.

After spending a good amount of time at your favorite forums, you should be able to tell the good people from the ones that are full of crap. These are the people that you can, for the most part, trust in what they say. Get in contact with them, introduce yourself, and even try and help them out if you can. If you scratch there back, they will scratch yours. The search engine marketing industry does have some really helpful people in it; you just have to find them.

Here is a short list of people and there websites that I trust on what they say. This list could be much longer, but I am just going with a quick 15 to start. Some on the list are household names in the search industry. Even though I have never met them, what I have read by them along with there reputation is why they are on the list. You can read them on your own and discover other marketing methods that can help you.

Danny Sullivan
Barry Swartz
Andy Beard
Sebastian
Jill Whalen
Marty Weintraub (AimClear)
Jaan Kanellis (Incrediblehelp)
Michael Gray (Graywolf)
Rand Fishkin
Bill Slawski
Donna Fontenot (Dazzlin Donna)
Tamar Weinberg
Aaron Wall
Ruck
Lisa Barone

One thing you have to realize is there are circle’s of friends in this industry that help each other out. In these circle’s there are techniques that each of them use that they hardly tell anyone. In the end improving your SERP’s is a competition, so if you have found something that is really helping out, chances are you are not going to share it right away.

I hope you come to understand the difference between truth and speculation in this industry. You will find the truth by exploring, researching, and participating more on what it is you have read. You then can determine if the technique is worth the time and effort and how it COULD help or hurt you.

This can be compared to a drag race, where what you have read tells you how to run a 9 second ¼ mile time. “Just increase the boost of your turbo, increase the fuel flow and use nitrous”. Ok great, you just increased the boost to 22lbs. (22 was a good number to use I guess since I didn’t bother to research what effect it has), increased the fuel flow by over ½ and I will use nitrous right at the start and not let off until I reach the finish line in 9 seconds. After reading about it for the first time, implementing into your car you head down to the track. Your up next and start to shake in anticipation…will what I read really work for me…I can’t wait! The light turns greet, you drop the clutch and hit stage 1 of your nitrous and your…oh shit……BOOOOOMMMMM! You then realize that your fuel management system was turned up to high, thus flooding the car at the start and by hitting the nitrous you just shot your pistons out the side of your fender.

See what can happen when you speculate on something that was supposed to work. I guess next time you might look a little deeper into the source of your information.

Get A Free Domain Name From Register.com

Misc. 2 Comments »

Yes I know that domain names are very cheap to buy, but if you are trying to see where you can save any type of money with your marketing efforts then check out register.com. This promotional offer will give you a free TLD for the first year, all that is required is your billing information. Even though you give them your billing information, they do not charge you for the first year. However after your year is up and it is time to renew, they will charge you the $35 to renew your domain name. Just before your domain name is about to expire, you can transfer your domain name to another service. All you need to do is call register.com and request the change and pay the domain fee for whatever company you are switching to. Here is the link to the current new year promotional offer by register.com

http://www.register.com/promo/acquisitions_8772090537.rcmx

This article was originally written and posted on SEMSpot.com, a Search Engine Marketing Blog.