How to find Good Keywords From your Own Tracking - using the OOOFF Tracking system

Affiliate Marketing, PHP Automation Coding 7 Comments »

As you probably know one of the best places to find keywords for you campaigns is in you own logs or tracking. And the most up to date info is tracking the people come to your site via search queries. Now you can track these in your your logs or a click tracking system like the one I’ve been laying out on here. One strategy I like to use, on Adwords for doing keyword research is to bid on single word terms. However to do this you don’t want to use your main account. I’d suggest setting up a new junk account and dumping in all the single words you can like “car” or “house” using phrase match and exact match. Then bid a decent amount so you make it up to the first page. These keywords aren’t that hard to get for fairly cheap as it’s hard to maintain a good CTR and not get QS’d out. Then run it as long as they let you until you get Quality Score screwed. Then go through your logs and pull all the queries out and look for themes and ideas of stuff that might bring traffic. Real search data is gold compared to those crappy keyword tools like spyfu or keywordspy.

For those of you using my click tracking script I’m going to share the code for scraping out the queries from google. With this you can pull the keywords that converted or any keywords from any click that came to your site. If you want conversions just add a http://www.domain.com/queryscript.php?type=conv


<?

dbconnect();

$sql = "SELECT DISTINCT(clicks.referer) FROM clicks, conversions WHERE ";
if($_GET['type'] == 'conv'){
$sql .= "clicks.id = conversions.click_id AND ";
}
$sql .= "
clicks.source = 'ggl'
AND clicks.country = 'uk'
AND clicks.referer LIKE '%christmas%'
AND clicks.matchtype = 'e'
ORDER BY clicks.id DESC";

$q = mysql_query($sql) or die(mysql_error());
$myarray = array();
while ($ref = mysql_fetch_assoc($q))
{
$ref = explode("?",$ref['referer']);
parse_str($ref[1],$output);
if(isset($output['q']))
{
$qstr = strtolower($output['q']);
}elseif (isset($output['p'])){
$qstr = $output['p'];
}

  if(isset($qstr))
{
$ex = array_key_exists($qstr,$myarray);
if($ex)
{
$myarray[$qstr] = $myarray[$qstr] + 1;
}else{
$myarray[$qstr] = 1;
}
}
unset($qstr);
}

sort($myarray);
foreach($myarray as $keyw=>$value){
//echo "$keyw"; this is if you just want the query for cutting and pasting
echo "$keyw,$value"; // this is if you want the keyword with the count of the number of queries it showed in.
}
?>

This is pretty crude and ripped right from my own system. But it’ll pull the keywords from the queries in the referers from Google.

Take these queries and dump them into their own campaign with exact match and phrase match only. No Broad match. And then watch what happens and make you’re adjustments from there. In another month do it again. You’ll come up with all kinds of good words you never would have thought of on your own.

Diorex - How to Measure a Niche Post

Affiliate Marketing 10 Comments »

Diorex’s How to measure a niche post. 

In the comments of my Affiliate Playbook post, I posted a link to SEO Blackhat’s list of 140 popular niches, by the looks of my outbound traffic, you guys were very intrigued by this.

Wanted to re-link to it for those who might not have seen it and follow-up with some comments about things to avoid or look for in a new niche.

Avoid -

·  If you read the name of the niche and a few keywords dont pop-into your head immediately, you should probably not pursue it. Just about any product or niche will have hundred or possibly thousands of keywords, but if you cannot come up with the 5-10 high volume searches immediately, I would say move on.

·  Follow-up this brief brainstorms with Google searches and pay attention to the ads. Are you going to be competing against common every day brand names or a bunch of mom and pops? I would discount the top 3 names and focus on how hard it is going to be to break into the second tier positions. Don’t let 1 or 2 brand names scare you, but if you look in 5th position and it is a fortune 500 company, then I might be tempted to move on.

·  You do not want to be competing against the manufacturers of the product, even if they are not brand names, if there are no affiliates in the space that is probably a bad sign. The reverse is true, if it almost entirely affiliates (like ringtones) then it is probably pretty crowded and as a little guy without a white label/special payout you are already off to a bad start

·  Is is it a product you know anything about? I dont think that unmarried college age guys are going to be rockstars at promoting a menopause product or even a baby shower list. Look to your life experiences for things you naturally know a little bit about. Sure you can learn, but why set yourself up for a longer more difficult road.

·  By the same token, I would also avoid things that have enormous keyword lists. Ringtones, DVDs, Books etc. It just means a ton of optimization and a much more difficult road to start with. If you are looking at more than 5-10 ad copies to start, move on. Try to group your keywords for similar themes, it makes testing easier and testing is where you should be making your money.

Stuff to look for:

·  Products that are not actually a product. If someone needs to pay for shipping or merchant might be out of stock or it cannot be shipped to the buyer quickly enough, then you may lose sales despite bringing a ready buyer to a merchant.

·  An established affiliate program - if you are having to explain what an affiliate program is to a merchant you are on a slippery slope. You don’t want to be the beta tester.

·  At least 2-3 affiliate programs that might compete against you and bid for your services. If you are the 800 lb. gorilla in a one affiliate program space you dont have nearly the leverage as if there were 2-3 others competing for your attention.

·  Possibility to rev share. Subscriptions are great like Shoemoney preaches. Services where almost 100% of the revenue is profit are great. If it is a high dollar product with a low margin, you are only going to get a small sliver of the sale price.

·  A payout that is north of $10. You simply cannot scale nickel clicks and a $2 payout. You are subject to even small fluctuations in search engine pricing or competition.

·  Areas where you can find 2-3 really good URLs available. Short, sweet and keyword rich. Probably 50% or more of your success is going to be related to the URL, no reason not to consider what you might use before you start. I have heard lots of stories of people building everything they need and then looking for a good URL. Thats the wrong order. If $50-$100 to register a bunch of URLs is more than you can invest, I dont know how realistic your success chances are.

I am going to leave you with this thought, I have shared many times before. If you are picking a niche because you hear “so and so” is making a killing in it without regard for any of the above factors then you are setting yourself up for failure. You should be entering a niche because you have some sort of advantage or knowledge rather than because you are following the pack.

I am sure there are lots more things others can add to these lists based upon personal experience - feel free to share em.

This entry was posted on December 1, 2007 at 8:22 pm and is filed under PPC, paid search. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Diorex’s - The Affiliate Playbook

Affiliate Marketing 7 Comments »

I don’t want credit for this it was written by a very smart fellow named Diorex who’s blog isn’t any longer online. So I thought I’d repost it as a lot of my readers have asked for it. Not sure what happened to his blog but here’s the Affiliate Playbook post from it.

The Affiliate Playbook

I have been asked how to scale probably 100 times since I started blogging. It has been a long time since I have tried to scale that I might not be the right person to ask, but I have done it 3 different times in 3 different ways for paid search campaigns over the last 5+ years. So forgive me if this game plan is hopelessly outdated or too brutally honest.

Our goal - starting with a single niche and the standard affiliate payout transform into a super-affiliate making 6+ figures a month.

Some caveats:

·  This assumes that you are not in a terribly crowded field, so mortgages, payday loans, satellite, ringtones and a few other ‘flavor of the month’ affiliate campaigns probably won’t work on this plan.

·  This is not going to work on a $2.00 zip submit payout, so please don’t ask. If you dont have a starting payout north of $10 it is probably best to pick a different product.

·  The goal is sufficient (7+ figures per year) that I am not even going to try and pretend to do this with $2,000. I had lots of money in the bank each time I started over and invested significant sums to get scale with each.

·  I am not going to live in my mothers basement and hope that the affiliate manager at my merchant notices me and rewards me with a higher payout, I am going to meet the senior guys at the network, then the affiliate manager at the merchant and then the affiliate managers director or VP and impress them that I can help them achieve and exceed aggressive goals. In short I am in a real business that happens to be online, but I am not a hermit crab.

Here is what needs to be in place to start:

·  We have located a product with a decent payout, that is not already stuffed with affiliates, offered by at least 2-3 respectable networks.

·  We have designed or paid an expert to design a great landing page with good usability and website surrounding it with good content and at least 8-10 pages deep of keyword rich content that is unique to my site that will pass all sniffs of the quality score test because it is quality and relevant.

·  We have some good tracking in place so that I can determine ROI by keyword.

·  We actually took the time to create well thought out ad copy unique to my high value keywords.

·  We did not jam tens of thousands of keywords into one adgroup or campaign and then wait to see which ones work.

·  We approached this with pride of ownership, something where quality of work shines through, nobody is going to call this crap.

·  We came to the party with 3-6 hours every day to tweak and monitor this campaign, and not just for the first week but for the next 12-18 months. 7 days a week, holidays, weekends, when I am out of town, when I feel like shit and when my buddies are out doing something a lot more fun.

·  We have a solid credit line dedicated just to this, and I dont mean buying 30″ dual monitors and Herman Miller chairs before I ever make a penny all those awesome systems you see online were bought after the fact not before.

If you cant, wont or dont know how to do any of the above, Stop reading. The rest won’t help you one bit.

So we now have a single affiliate offer at standard commission with well thought out ad copy, landing pages and some money ready to turn on our adwords campaign.

·  My first goal is to just get on the networks radar, let them know who I am, do enough volume that my account manager does not have to figure out who I am, get me on his radar. To do this I need to drive consistent steady volume. Anyone can be a flash in the pan and bid to first place and lose a ton of money and then fade away. They see it all the time, and are not going to be impressed. Instead show them consistent steady volume, maybe do this with just a few high converting keywords, or lots of cheaper long tail ones, maybe just bid to 9-10th place on the short tail stuff. Our goal is to lose as little as possible while still being consistent.

·  At this stage, no way am I going to get anything like a white label or even an invite to dinner when my affiliate manager is in town. I have a few limited options to test. The first thing is the display URL. I want something that describes the product generically (dont infringe on copyrights) in a short of way as possible using high volume keywords. Widgets.com is probably not going to be available to you. Try WidgetsDeluxe, WidgetsFast, WidgetsEtc. Take your primary keyword and get 5-7 short and sweet URL’s and test them in rotation using Google ad copy testing tool. 1 or 2 of these is going to perform better than the rest. This will take you from slight loser to slight winner. Increase bids accordingly until you are back to slight loser

·  So with a little bit of traffic we probably just increased volume by 20% or more just by fiddling with the display URL and then bumping bids. With that small bump in volume over the levels your network was used to seeing, approach them about a better payout. You will probably get it since you have established consistent volume and are not just a flash in the pan, dont ask for a bump before you prove anything.

·  With the 10% or so boost in payout, dump those revenues back into your bids. You are probably now 4-6 weeks in and are down a couple of grand and you are probably now in the bottom of the middle of the results. Now is the time to add in Yahoo and MSN. MSN will convert well but provide low volume, Yahoo will convert worse in most cases and be 1/4 to 1/3 of the volume of Google. Go back to your network again and get another small bump. You might need to play 1 network vs. another. Dont be untruthful about what a payout is being offerred, it is a small community and you dont want to burn bridges or be seen as a liar. Get that 2nd bump and now you are 20% or so higher than you were before.

·  It is now time to test ad copy. Always start with things on Google since your test volume is Clicks/impressions rather than Conversions/clicks. Until you have good volume it is important to test what you can get answers on and not eat up tons of test bandwidth. Although CTR is important, be sure to drill down to conversion rate per test since that is ultimately what matters.

·  You have now gotten 2 bumps from networks and are probably not going to get a ton more since they only have so much to give. You should be 3+ months in, plenty of time to have hit a pubcon or ad:tech or SES or just arranged an onsite meeting with the affiliate marketing manager for the product you are working on. Start by email, then work your way up to an occasional IM and eventually phone and in person meetings. Your goal is get your foot in the door and remove the affiliate network from the picture and get them to agree to a white label situation. This may take months, so get cracking early on this. Your white label will get you 10% increase in conversion overnight.

·  Either right before or right after you get the white label (at the very least be in talks with them) start aggressively testing landing pages. Start with 2 or more radically different designs and then pick a design winner and then test other elements like hero shots, call to actions, button language, placement of items on the page. Before starting this, you should have invested in SSL certificates and be landing in a secure environment and displaying the security seals prominently to let visitors know you are serious. If you cannot get a 30-50% increase in conversion with your landing page, you are not trying hard enough.

·  Between the 10% security seal boost, the 10% white label boost, the 30% boost to conversion from testing the page, you should now be pulling yourself back to even and even turning a small profit, dont spend it just yet though. Just like with the affiliate network, you need to establish a baseline of consistent results where the merchant starts to assume your volume is always going to be there.

·  You have worked with the merchant for 2-3 months and they are treating your volume like their volume (trust me this will happen). You have flown to corporate HQ and met the director or VP who the affiliate manager reports to, you are now negotiating with him rather than through the affiliate manager who has no real power in most cases. You need to let it be known that you could drive a lot more volume with a decent sized payout increase. They will salivate at the idea of volume, but will also be hesitant to give you a big boost. At the same time you are seducing the VP, you are making inquiries to one of your largest competitors about moving your volume over, you want to get a white label from them from the start (they are poaching an affiliate which is different than working with a small guy). Before you move your volume over, you call the VP at your original merchant and “give him a heads up” that you are going to test XYZ (tell them the name) for a few days, but you dont want him to worry too much, you will turn the volume back on in a few days, worst case a few weeks. You have now caused him to sweat and think that he might lose you. He has already budgeted in your volume and those resulting profits to his boss, he has probably mentioned to his boss that their could be more volume if they were willing to pay up. Now the choice almost becomes nothing from you or pay you more.

·  In almost all circumstances, you will probably want to work long term with the same company and not jump around to the highest pay out all of the time. That does not mean you don’t flirt with the others and even have a few “test runs” for a few weeks every so often. Don’t seem fickle or emotional, just act like you are a businessman (which you are) and you are looking out for your own interests as good business (which it is) and you will soon be viewed as a strategic partner rather than an affiliate.

·  At some point it will probably make sense to go to some sort of tiered pricing structure. Make sure you can hit these targets. Do not get paid $x for first 10,000 units and $y for units 10,001 - 15,000 and $z for 15,001+. Instead you want to hit a tier and get paid retroactive to the first unit. They will resist, but this is imperative for you. It means that sometimes you can take a loss per unit the last few days of the month and drive a ton of volume in order to hit your tier so you make a greater overall profit. The reason this is important is that the merchant sees these volume surges and starts thinking how they can get them every day instead of just the last 3-4 days of the month, then you are on for another round of negotiations. Always have a tier you have not yet met. When you start hitting the last tier, time to start negotiating for a new tier.

·  In time, the merchant will get addicted to your business, they will spread their overhead across all of their traffic (much of which is really your traffic) and start seeing economies of scale. This is when you really have leverage. Dont be a bad business partner, just dont be a meek one either.

·  The last 4-5 bullets I have not mentioned continual testing of things like the form, possible cross-sells, gathering an email list, retargeting, and a whole host of other stuff. Our philosophy is that we have to increase conversion by 20% each year to just stand still, once you start standing still, others start to pass you and you start to lose your leverage. Once you lose leverage, it is almost impossible to get it back. Never stop testing.

OK I want to thank both of the people who made it to the bottom of this post. It is obviously not exhaustive, but it is a reasonable series of steps for how to start as a dinky small fry affiliate today and 18-24 months from now be writing your own blog and posting a big check. Of course you will be doing so well you might also think, being rich and unknown with no competition may just be better than rich and famous with 100 new people entering your space hellbent on killing your margins…

Hysterical Internet Bubble Video

Affiliate News, General No Comments »

I don’t like to post random stuff much but this video about the current internet bubble just about killed me. Check it out if you get a chance

MetaCafe - Here Comes another Internet Bubble

Update to PPC Click Tracking Script for Yahoo and MSN…

Affiliate Marketing, PHP Automation Coding 2 Comments »

Sorry for the long time between posts. Just things have been very busy lately. Here’s an update to the click tracking code for tracking your conversions to include yahoo and msn pay per click. I just pulled this direct out of my system. This also includes a way to exclude bots by IP. Using the list from iplists.com I in a file called ip_list.txt in the same directory as you tracking file. So that your tracking doesn’t record bot visits. Below have included the updated sql schema for click tracking, it’s a little messy and could be better but just haven’t had time to improve it. If someone has a better click tracking schema around I’d be interested in seeing it.

So our urls to use to track

Yahoo Search Marketing:
http://www.yourdomain.com/index.php?s=ysm&n=1
To make this work properly you need to enable tracking URL’s in your account. This will pass all the appropriate variable automatically.

Google Adwords:
http://www.yourdomain.com/index.php?s=ggl&qs={keyword}&k={keyword}&n=1
This could be improved to scrape the query out of the referer and use that for the Query String in the table, it’s on the list.

MSN Adcenter:
http://www.yourdomain.com/index.php?k={Keyword}&s=msn&qs={QueryString}&mt={MatchType}&oii={OrderItemId}&ai={AdId}&n=1

<?
$keyword = addslashes(trim($_GET['k']));
session_start();
DEFINE('DB_HOST','host');
DEFINE('DB_USER','username');
DEFINE('DB_PASS','password');
DEFINE('DB_PRIMARY','tracking');
@mysql_connect(DB_HOST,DB_USER,DB_PASS);
@mysql_select_db(DB_PRIMARY);
if(mysql_ping() == true)
{
if(!isset($_SESSION['id']))
{
// Server variables
$ip = $_SERVER['REMOTE_ADDR'];
$referer = $_SERVER['HTTP_REFERER'];
$useragent = $_SERVER['HTTP_USER_AGENT'];
$source = addslashes(trim($_GET['s']));
$site = addslashes(trim($site));
$niche = trim($_GET['n']);
if($niche == ''){ $niche = 1; }
$loc = trim($_GET['loc']);
if($loc == ""){ $loc = "us"; }
if($source != "ysm")
{
$keyword = str_ireplace("_"," ",$keyword);
$query = addslashes(trim($_GET['qs']));
$matchtype = addslashes(trim($_GET['mt']));
$item_id = addslashes(trim($_GET['oii']));
$ad_id = addslashes(trim($_GET['ai']));
$clickid = addslashes(trim($_GET['gclid']));
}else{
$query = addslashes(trim($_GET['OVRAW']));
$keyword = addslashes(trim($_GET['OVKEY']));
$matchtype = addslashes(trim($_GET['OVMTC']));
$ad_id = addslashes(trim($_GET['OVADID']));
}
if(!CheckBotIp($ip))
{
$sql = "INSERT INTO `clicks` (`keyword`,`source`,`ip`,`referer`,`useragent`,`time`,`site`,`querystring`,`matchtype`,`orderitemid`,`adid`,`clickid`,`niche`,`country`) VALUES ('$keyword','$source','$ip','$referer','$useragent',NOW(),'$site','$query','$matchtype','$item_id','$ad_id','$clickid','$niche','$loc')";
//echo $sql;
mysql_query($sql);// or die(mysql_error());
$id = mysql_insert_id();
$_SESSION['id'] = $id;
$_SESSION['keyword'] = $keyword;
$_SESSION['referer'] = $referer;
}
}else{
$id = $_SESSION['id'];
$keyword = $_SESSION['keyword'];
$referer = $_SESSION['referer'];
}
}
/**
* Functions
*/
function CheckBotIp($ip)
{
$flag = 1;
$ips = file("/home/ip_list.txt");
$ips = array_map("trim",$ips);
foreach ($ips as $listip)
{
if($ip == $listip)
{
return 1;
}
}
}
?>

Here’s the updated schema to record for all systems. As I mentioned before it’s crude and needs some work so if anyone wants to contribute I’d be happy to post it and give you credit.

– phpMyAdmin SQL Dump
– version 2.11.0-dev
– http://www.phpmyadmin.net

– Host: localhost
– Generation Time: Dec 14, 2007 at 02:34 PM
– Server version: 5.0.22
– PHP Version: 5.1.6

SET SQL_MODE=”NO_AUTO_VALUE_ON_ZERO”;


– Database: `tracking`

– ——————————————————–


– Table structure for table `clicks`

CREATE TABLE IF NOT EXISTS `clicks` (
`id` double NOT NULL auto_increment,
`keyword` varchar(255) NOT NULL default ”,
`source` varchar(255) NOT NULL default ”,
`ip` varchar(15) NOT NULL default ”,
`useragent` varchar(255) NOT NULL default ”,
`referer` varchar(255) NOT NULL default ”,
`time` datetime NOT NULL default ‘0000-00-00 00:00:00′,
`site` varchar(100) NOT NULL default ”,
`querystring` varchar(255) NOT NULL default ”,
`matchtype` char(2) NOT NULL default ”,
`orderitemid` varchar(255) NOT NULL default ”,
`adid` varchar(255) NOT NULL default ”,
`medium` varchar(50) NOT NULL,
`network` varchar(10) NOT NULL,
`clickid` varchar(50) NOT NULL,
`niche` int(11) NOT NULL,
`country` varchar(20) NOT NULL,
PRIMARY KEY (`id`),
KEY `medium` (`medium`),
KEY `source` (`source`),
KEY `time` (`time`),
KEY `useragent` (`useragent`),
KEY `country` (`country`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0;

– ——————————————————–


– Table structure for table `conversions`

CREATE TABLE IF NOT EXISTS `conversions` (
`id` double NOT NULL auto_increment,
`click_id` double NOT NULL,
`source` varchar(50) NOT NULL,
`date` date NOT NULL,
`campaign` varchar(255) NOT NULL,
`campiagnID` varchar(20) NOT NULL,
`transactionID` varchar(50) NOT NULL,
`lineitemID` varchar(20) NOT NULL,
`commission` decimal(10,2) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `transactionID` (`transactionID`),
KEY `click_id` (`click_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0;

Great Post By Diorex on a PPC Plan of Attack

Affiliate Marketing 4 Comments »

I don’t know how many of my readers are into pay per click affiliate advertising but for those of you who are I just read a great post with a plan of attack for how to take on a new campaign. If you’re not familiar with his blog he has a ton of good info on how to make landing pages that convert, finding affiliate offers and scaling your operation. If you get a chance and are interested check out his blog and this post in particular.

Diorex

P.S. Try to see past the boasting :D He’s really a nice guy.

Making Big Easy Money with Google Local Search

Affiliate Marketing 25 Comments »

As most of you know I’m quite heavily involved with the Payday Loans niche. So I’m constantly scavenging anything I can for information and ideas. Right tip top on that list is searching for things in google and seeing what new pop’s up. And that’s exactly where this idea came from.

Yesterday I was looking at buying a few thousand payday domains for local stuff and was doing some searching in Google to try and find out what would be the best play when I came along a guy that was VERY effectively spamming local for payday loans. He’s in position 1 for all the good payday loan terms + the major city name.
If you don’t know what a local listing looks like it’s the listings in the the search results next to the the map at the top of the page when you include a city or city, state in your search. For example here’s a search for cash advance atlanta, ga. Do you see how the map shows up with the listings? Cool huh, couldn’t pick a much better location for natural serp results then that.

So I’m sure you’re asking yourself how to I get in the google local? Well it’s frairly simple from a web prospective all you do to sign up for google local is setup a google account then click here to sign up for google local.

Now comes the tricky part, Google is going to send you a post card and you have to figure out some way to get that back to them. Now if you live in a major city you can just use your personal address and maybe a business address. But what if you wanted to do it on a large scale? You’d need to find some sort of service that would allow you to use them as a mailbox and then would forward you their mail from there…..

So lets return to that Cash Advance Atlanta, GA result. Now if you didn’t see it the first time the position one spot is a spam site. http://www.atlantacashadvancepaydayloans.com ( cut and paste the as the guy is redirecting traffic from here ) , you see it now? :D So it has an address associated with it, if we do a little search on what that address is low and behold it’s a mailboxes etc/ups store as you can see from a search for the address.

Now that we know this I called and found out how much a box was at this Atlanta store with forwarding. What they told me was it’s $69 for 3 months which is their minimum subscription time. Then 5$ for each batch forwarding plus postage. Since we only need to get one postcard it’d probably cost you 69 + 5 = $74 to set this up. And you have a unique address in a flash :D To make things easier all the UPS Stores use the same sheet for sign up so you can just get a list of a bunch of stores then fax the same sheet to all of them. Waah laah we have local businesses in all the major cities. For a quick text list of the top 50 major cities by population in the U.S. Then just go to http://www.theupsstore.com and get a list of stores you want to use in each city. There’s lots!

Also you’ll notice that domain the fellow is using is keyword rich http://www.atlantacashadvancepaydayloans.com.

If has the city name and both the top keywords for the payday niche.

  • payday loans
  • cash advance

If you wanted to compete in the payday niche I’d suggest something like atlantapaydayloanscashadvance.com or atlantacashloancashadvance.com. Then just take and point the domains to the same location using Virtual Hosts in apache. Reference my domainer timed redirect post if you want to know how to do that. Or easier just tell your hosting provider you want to point all your domains to the same place. Then they can make a catch-all and any domain you point to the server that doesn’t have a listing in the config file will go to your page. To make things a little more targeted you might want to write a little script on the page that parses the domain name then uses the city name with a on the fly find and replace. So you’d grab the domain and parse the name, then in your template would put <? echo $c; ?> rather then hard coding the city. So your template would look like this.

<?
// loads all the cities for a file into your array
$cities = file(”cities.txt”);
//gets the domain that is being called
$domain = $_SERVER[’SERVER_NAME’];

// runs through each city in the city list to see if it matches the one in the domain
//if it matches then it assigns that to the $c variable which is what we’ll use in
// our text output.
foreach($cities as $city)
{
if(strpos($domain,$city))
{
$c = $city;
}
}
?>
<html>
<head>
<title>This is my page title for city <? echo $c; ?></title>
</head>
<body>
<H1>Header for City <? echo $c; ?></H1>
<p>Text for city <? echo $c; ?></p>
</body>
</html>

Now we have a dynamic created page based on the city being passed. We’re getting a list of all the cities we’re using. We know that the city name is in the domain so we check which city we’re using. Then we assign that to a dynamic variable we echo out in our on page copy. Pretty easy huh. Couldn’t make a post with no coding in it so I went back and added this later :D

Another thing I noticed is his domains are listed in a few of the other local searches like Superpages and I’d suggest submitting it to as many local places as possible as that’s going to give the site even more exposure. However I’m not sure this is necessary as most of these scrape google anyways.

“That’s great smaxor but how do I make money now that I have the listing?” Well the easiest is to use something like he is which is a affiliate company that allows you to private label their offers. He’s using http://www.leadpoint.com, which you can tell by the secure rights tag on page 2 of the site once you click the button. Another company that allows you to integrate their stuff into your own pages is LeadPile (affiliate link, thanks if you use it ) both companies are good however LeadPile takes everyone and Leadpoint can be picky and not take advertisers.

And that’s it! So how much is potential with something like this? Well a payday lead on average sells for 20-30$. And I know that with position 1 in Google for the keyword “payday loans” it’s worth at least 150 minimum leads a day. Now this is more targeted and could get a better click through and conversion I would assume as people think they’re local near them. So only 4 leads a day from each local listing would pay for the whole setup. I’m sure you’d get a lot more then 4 leads a day in cities like Los Angeles, New York, Atlanta, Chicago. Yup there’s a truckload of cash to be made with this if you put in the time. There’s a lot of niches this will work with I just happened to find it with payday.

And lastly lets take a look at how this guy is doing with his rankings

Atlanta, GA
payday loans
cash advance

San Francisco, CA
payday loans
cash advance - only listing

Chicago, IL
cash advance

New York
cash advance
payday loans

And the list goes on, I’m not going to list all of them but you get the point :D

Now get out there and make some coin.

P.S. You’re probably going to ask why did I reveal this and I’m not doing it myself? To many projects I wish I had time because this seems like a real money maker. Good Luck!!!!

Free - Open Source Analytics/Statistics Package

Affiliate Marketing, General 4 Comments »

I was poking around trying to find a nice analytics package the other day when I came across a fantastic open source one. If you’re interested in tracking and analytics of your sites you might want to check out:

Free Analytics and Statistics Package - http://www.phpmyvisites.us 

Now I know it doesn’t do everything that a lot of the  of the paid services do with click streams and the like. However if you’re currently using something like statcounter.com this is definately a better solution as it gives you:

  1. One it’s a free analytics/statistics package
  2. Has heatmapping built in
  3. You host it so you’re not sharing your data with anyone.
  4. You get a lot of the features that statcounter charges you extra for for Free.

I’ve been looking at it and it would be great to hybrid it with a a click tracking system for PPC. I haven’t done a ton of research into the code yet but if someone was interested in working on this together it might be pretty cool to build a click/conversion tracking plug-in for it. Then eventually move that to a bid management plug-in of some sort. Let me know what you think.

Easy “PHP Proxy Checker” Writing Tutorial

PHP Automation Coding 10 Comments »

I started to write this on Eli’s forum but decided to add it here so everyone could reference it.

If you have a list of proxies that you’ve got from somewhere and want to verify if they’re good or not this is simple script that will read a text file and check them.

First we’ll make a text file with our proxies on each line of the file in the format IP:PORT with one per line.

127.127.127.127:2487
123.123.123.123:3248

then save that text file as “proxylist.txt” in the same directory as the php file you’re going to make. Then we’ll start our php file with our proxy checking in it. Here’s the complete script that just echo’s the status of each proxy out to the screen. We’ll make a few changes and have it write a new file with only the good proxies next.

// This is the page that that we're going to request going through the proxy
$testpage = "http://www.google.com";
// This loads all the proxies from the file into an array
$proxies = file("proxylist.txt");
// Here we loop through each cell of the array with the proxies in them testing each one until we get to the end of the array
foreach($proxies as $proxy)
{
// This script utilizes cURL which is library you can read more about
//using curl in my intro tutorials
// starting curl and setting the page to get
$ch = curl_init($testpage);
// sets the proxy to go through
curl_setopt($ch,CURLOPT_PROXY,$proxy);
// sets to use a tunnel proxy which most http proxies are
curl_setopt($ch,CURLOPT_HTTPTUNNELPROXY,$proxy);
// makes the curl call do it's work based on what we've set previously and
//returns that fetched page to $page
$page = curl_exec($ch);
// cleans up the curl set
curl_close($ch);
// this will check that there was some html returned, now some sites might block some
//proxies so you'd want to set for that specific site in the $testpage var and then
//find something on that page to look for with the below function.
$check = stripos($page,'</html>');
// if there was a match in the stripos (string postion) function echo that the
//proxy got the data and works
if($check > 0)
{
echo $proxy." Works!
";
// or else echo it doesn't work
}else{
echo $proxy." Is Dead!
";
}
}
?>

There’s your code. The gist of this is that we load each line from a file into an array. Then we loop through each array element checking if we can get the google page going through the proxy. Then if it pulls data it prints on the screen that the proxy works or if it doesn’t get something returned it doesn’t.

Now we might not want to print things to the screen and would rather make a new file with the the good proxies. To do that we’d swap this code:

if($check > 0)

{

 echo $proxy." Works!";

// or else echo it doesn't work

}else{

 echo $proxy." Is Dead!";

}

with:

if($check > 0){file_put_content("newproxylist.txt",$proxy."n",FILE_APPEND);}

rename('proxylist.txt','proxylistold.txt)';

rename('newproxylist.txt','proxylist.txt');

}

And that will write a new file and add each of the good proxies to it. Then rename the the original file to proxylistold.txt in case there was an error it’s good to have a backup. Then we rename the newpoxylist.txt to the standard proxylist.txt and it’s all fresh and ready to go. There you have it a nice simple proxy checker.

P.S. make sure you make the dir that they’re in writable as there’ll be issues with creating a new file in an unwritable dir.

P.P.S Trying this new code plug-in and well let me tell yah. IT’S A HUGE PAIN IN THE ASS!

Domainer Time Based Redirect PHP script - Part 1

PHP Automation Coding 8 Comments »

As most of you know I’m no domainer. I think I own a grand total of 100 domains or less. However one of our readers is and asked for an easy script to redirect their domains in a time based fashion. He mentioned that after tracking his domains he finds that sometimes redirecting the traffic to a parked page makes him more money for those times then it would redirecting it to an affiliate offer.

Denis:
“I am looking for some kind of script, apps, or any kind or solution that will let me have a complete archive of all of may domain names and basically redirect each one to either my server, parking program or affiliate pages.

I know there are certain scripts out there with a control panel to organize /redirect domains but I want to take my domains one step further and have some of them redirect only on a hour, day, week, month schedule.”

You can read the comments where the conversation stemmed from here here.

The Domainer Time Based Redirect Project

For this project we have a few goals

  1. Make domains point to the same server.
  2. Have that server forward all domains that it doesn’t recognize to the same file to be process and controlled by that file.
  3. Design some sort of data structure to hold the incoming domains and where they should be forwarded to
  4. Build a file that will look for that domain in a database and then verify against what time it is to determine where it should send the traffic to.

Sounds fairly simple but it’ll be a bit complicated. That’s why I’m going to split this tutorial into 2 parts.

  • Part 1 - Will be how to setup your DNS and Apache to take all domains that are pointed at it and forward it to the same file.
  • Part 2 - Will cover how we’re going to hand the data structure with a database.
  • Part 3 - Will finish it up with the file to control the traffic based on looking at the data structure.

Let’s get going.

How to point your domains at your server using Namecheap.

Since I’m talking to domainers I imagine that most of you know how to handle DNS and how to point your domains at a server. However I’ll cover how I handle it using Namecheap. I’ve mentioned before I’m a huge fan of Namecheap as their control panel and features are fantastic. If you don’t use Namecheap and use some other registrar you’ll need to get your domains pointing to your server on your own.

First thing we’re going to need to get is the Ip address of your server where you’re running apache and we’re going to be pointing your domains at. If you don’t know this the easiest way is going to be to use a command like ping to the server if you’re used to using a domain. you’ll get back a number that has 4 parts separated by periods called an IP address. This is where we’re going to point your domains at when we login to namecheap. Let’s use oooff.com as an example. Lets say I didn’t know the IP of oooff.com there’s a few ways we could get it. One way would be just ping the address by going to start/run then typing in “ping oooff.com”. Or there’s a lot of services out there to get IP’s for example you can go here., put in the domain server domain and it’ll return a number that looks like this 64.202.163.77. This is going to be the IP address for oooff.com.

Once we have the IP address we’re going to go to namecheap and login like you normally do. Go to manage domains then click on the domains or select all the domains and hit bulk edit for the domains you want to point at this server. Next we’ll click on “All Host Records” in the left menu column. Once we’re in all host records we’re concerned with the two spots at the top. the “www” and “@”. The “www” is of course going to be where you want the http://www.oooff.com sent and the “@” is going to be where you want http://oooff.com sent. In our case we want them both sent to the same place can you guess what that is? Yep the IP address we got using the ping tool. Also we want to set “Record Type” on both to “A (Address)” as this will use the Namecheap name servers and point them at that IP. Typically this will take 5-10 minutes to update but once this time has passed when you put the domain in your browser you will probably get the default page for you server, a 404 cause your server isn’t setup to handle random domains pointing at it, really just something different then you were getting when you started.

Now that we have our domains pointing to the server we need to do some configure apache to make it do the right thing with the incoming domains. If you’ve never messed with Apache and the Apache Config file before this might be a little intimidating so I’ll make it as simple as possible. Basically the /etc/httpd/conf/httpd.conf file is what controls Apache and tells it how to handle incoming domains basically what folder/directory to send them to. So go to you server via FTP or SSH and find the httpd.conf file. It’s usually in /etc/httpd/conf/ directory if not you might need to do a little searching around to find it. Once you find it open it up and take a look through it. What we’re concerned about is the lines right towards the bottom. Called the VirtualHhost section. There’s a couple of lines in that section we’re concerned about.

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

This tells the server to use domain base Virtual Hosting which is what we want to do. Then the second lines we care about are

<VirtualHost *:80>
DocumentRoot /var/www/html
</VirtualHost>

What this section is saying is take any incoming domain that doesn’t have a specific record and send it to that location on the server. Now the /var/www/html dir is the default for most apache servers. If yours looks like this we only need to change one thing and that’s to change the document root to somewhere else where we’re going to put our PHP file that’s going to handle all our incoming domains. If that directory doesn’t exist then I suggest making it :) In our example we’ll make a directory dcontroller in /var/www/html. So our virtual host entry would look like this

<VirtualHost *:80>
DocumentRoot /var/www/html/dcontroller
</VirtualHost>
And that’s it. Just save the file then restart your Apche if you’re in on the comman line via SSH just type “server httpd restart”. Or if you have a CPanel/WHM setup you can go to the interface and restart the server there. Now if you have a hard time with this just ask your hosting company as they can easily do it for you. However it’s a great thing to know how to do and understand. Every little piece helps.

Now lets test is our setup is working right. One last piece we’d need to test our setup is working it putting a index.html file in our new directory. Just make a little html file that has a “<h1>Working</h1>” in it. Save this file then go to your browser and type in the domain you setup to point to your server. If you see “Working” displayed in the browser you know you’re golden. If not you know something went wrong. Just contact your hosting support and they’ll guide you I’m sure.

That concludes part 1 of the domainer time redirection system, I’ll try and get the next part written in the next week. Let me know if you have any questions or suggestions and I’ll help if I can. I’m no *nix expert, I just know enough to get by :D