When you begin to get deep into the world of affiliate marketing, a few things happen:
- You begin to miss your family, because you’re always doing “computer stuff” they don’t understand
- You have a lot of accounts at different merchants/affiliate networks and you log into those accounts all the time to check your income
- You should be making some money
The number 3 part is what keeps people like you and I going. Otherwise we’d have better things to do with our time, right? Right. In fact - even while making money, we have better things to do with our time.
Hmmm…so what can we do about that? How can we maximize our time? I know: let’s do what I’m constantly harping about, and make a computer do the job we don’t need to do. In this case, let’s make a computer log into our affiliate accounts and check stats. Sound good? Good.
For this example, I’m going to show you how to use PHP and cURL to check your Shareasale stats. (Yes, that’s my affiliate link. Come onnn, just click it and join.) I’m using SAS in this example just because I mentioned them recently in the post “Making Money With Shareasale” and I’m soon going to make even more Shareasale tools available to you. So I thought, “Why not prepare everyone with a nice way to automatically gather their stats?”. But the following lesson can be applied to just about any affiliate site…or any website for that matter.
I assume you are familiar with running PHP scripts, at least. Because I sure as hell ain’t gonna teach you how to write a basic PHP script when there are perfectly-good $50 books with animals on the cover to show you that. (And, perfectly good free websites to help you learn PHP, as well.)
So let’s just jump into it. Here’s a script that logs into Shareasale, grabs the current amount of income, and shows it to you.
<?php
$username="superoptimist";
$password="ibelieveinmyself";
function return_between($string, $start, $stop, $type)
{
$temp = split_string($string, $start, AFTER, $type);
return split_string($temp, $stop, BEFORE, $type);
}
$curl = curl_init();curl_setopt($curl, CURLOPT_REFERER, "http://www.shareasale.com/a-login.cfm"); //Where I came from..
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1");
curl_setopt($curl, CURLOPT_COOKIEFILE, '/public_html/cookies/cookie.txt');
curl_setopt($curl, CURLOPT_COOKIEJAR, '/public_html/cookies/cookie.txt');
curl_setopt($curl, CURLOPT_POSTFIELDS, "step2=True&username=$username&password=$password&submit.x=40&submit.y=19");
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_URL, "http://www.shareasale.com/a-login.cfm");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);$page = curl_exec($curl);
echo 'logged in';
curl_setopt($curl, CURLOPT_GET, 1);
curl_setopt($curl, CURLOPT_URL, "http://www.shareasale.com/a-main.cfm");
curl_setopt($curl, CURLOPT_REFERER, "http://shareasale.com/a-login.cfm");
$page = curl_exec($curl);
$total=return_between($page, '<font color=gold> <B>$', '</B>', EXCL);
echo 'got income amount';
echo 'Total Amount $'.$total;
curl_close($curl);
?>
And that’s it. Put your real SAS login info up in there, run it, and you will see a number appear on your screen - like $0.00, if you just opened your Shareasale account. But hopefully, eventually you’ll see some real income.
So why not just log in, manually? Well the point of me sharing this script is not to give you a marginally-useful script that you can use to get your current income. You can do so much more with this script once you think about the possibilities. Here are some:
- Make an affiliate dashboard, and include all your affiliate reports in a nice, single menu with that day’s sales, that day’s hits, current income, etc.
- Grab all your affiliates’ daily sales (running daily via cron) and throw that into a database. Use that to generate reports to show you things like: overall most profitable day of the week, most profitable merchant, product, etc. If you run a few scripts like this - say, one for SAS, one for CJ, one for CCBill, etc. and put it all together you can view reports like this across all your merchants and affiliate networks.
- Grab datafeeds daily or weekly from your merchants, and then update your databases (the ones that run your sites) with the latest products.
Get the idea? This is just an example of basic principles - but cURL is a powerful tool that can almost precisely behave like a web browser - just faster and automatically.
Hopefully you can follow the gist of what this script does, but here are a couple of pointers in case you need some cURL help.
Send what is expected. You must always send GET when the server expects a GET request, and a POST when POST is what’s expected. How to find that stuff out? LiveHTTPHeaders. Possibly the best FireFox plugin out there. At least to me. But there’s probably some weirdo out there with an Fellow Furry Finder plugin or something who thinks that’s the best. (Sorry, that’s not an actual plugin.)
Use LiveHTTPHeaders by selecting it, and then logging into the site you wish to write a cURL script for, and then examining the confusing stuff in the little window. All the stuff you will see is the conversation between your browser and the server. Your goal (in writing an automation script) is to replicate that conversation, or the format of that conversation.
Send in the order that is expected. This means that you must always have the proper referrer with each target URL. If every time a user who goes to accountadmin.php must have come from mainmenu.php, you better put mainmenu.php as your referrer when telling cURL to go to accountadmin.php. Follow the path that you would normally take (as a human, navigating a site).
Respect server resources. Do not do things like hammer a server every five seconds, or visit every hour and downloading a bunch of pics, or anything else like that. Remember Eli’s QUIT tool? Yeah, me too. I miss it. (*Sniff*). See, he shut down the whole damn thing just because of someone out there abusing the tool. If you do things like that to other people, they too will probably shut it down (at least, to your IP). Or they might track you down and punch you in the throat - who knows.
So did we learn something, kids? I hope so. I ain’t here to give ya’ll step-by-step instruction or nuthin’ - but I wanted to at least whet your appetite for some of the things you can do with cURL and maybe give you some ideas. Any questions? I’ll do my best to answer.
Popularity: 1% [?]
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags: Tools
There’s about a trillion ways (yes, I counted for a while) to make money using the internet. Popular ways include pay-per-click ads, and affiliate offers. We know that.
We also know about getting indexed (right?) and to some degree we should know how to properly optimize a site (it’s not like any of this is a secret anymore). Big deal. Easy stuff.
The hard stuff usually involves the following tasks (in no particular order):
1) Getting click on your affiliate links
2) Getting traffic to your site(s)
3) Getting clicks on your PPC ads
4) Getting content on your site(s)
The difficulty of these tasks doesn’t involve getting them done as much as it involves doing it well.
And I hate doing things inefficiently, incorrectly, or in way that just sucks. So recently I was thinking about Shareasale, and saw my measly balance for this month: $61.38. What the hell. Doesn’t even put gas in my car for a whole month.
So I got to thinking: what do I want? I’ll tell you what I want - a zero at the end of that number, to start with. How do I get there? Well, by multiplying the number of visitors by ten (you would think). How the hell can I do that?
I’m only one man. A strong, hulking man of impressive fortitude and wit, but only one man. There’s only so much I can do. So I decided to do something drastic - yes, that’s “write” - I decided to sit down and hammer out a script. (Haha! That’s write…get it? I wrote the script. Hehehe oh man…)
So here’s what the script does: it takes a datafeed from a SAS merchant, and it converts it into a full-blown store. (There was one for sale, that some guy was selling for $50 I think, but why the hell do I want that? So I have to not only increase my earnings but I have to first recoup the money I spent on someone else’s tool? I think not.)
“So what,” you might be asking, “what’s the big deal? Who cares if you can make a store in less than an hour with thousands of products in it?”
Well first of all, shut up. And to address your question: it’s cool on a few levels. Glad you asked. It’s a big deal because before this day, I was relegated to using some lesser tools that only output a) links alone, with no “real” content and b) not enough of them. Nothing that made a website. Now I can put the name of a text file in my script, run the script, and it generates an entire website - mimicking the actual merchant’s site.
Except this site is mine, on my domain. And it’s easy to do.
Oh yeah, and one more cool thing (I had to do this): it runs within WordPress.
Now, I didn’t integrate this with WordPress just to be cool - because there’s nothing particularly “cool” about this. (Motorcycles are cool. Cigarettes are cool. Tattoos are cool. But WordPress still (in 2008!) isn’t considered “cool”.) I didn’t make it into a WordPress-y site just to brag - because it’s not actually much to brag about, and I don’t run my mouth just to brag. (Making it work on Tandy 1000SX would be something to brag about, at least to the digg crowd.) I didn’t slap it into a WordPress site because I don’t know how to code or make a “real” site or whatever.
It is combined with a WordPress install for one simple reason: WordPress is possibly the most adaptable and useful platform available currently to quickly and easily produce a site that can be updated automatically, made to look any way I wish, and replicated endlessly. I put it into WordPress because it makes the most sense. (Yes I’m a believer in WordPress + FeedWordPress + a dozen other superb plugins that make life easy.)
So here’s where it stands now:
- A site takes less than a half hour to have up and running
- The site is instantly full of categorized products, with pics, details, etc.
- The site can (optionally) have RSS feed updates, pic feeds, etc. - basically, whatever you can do with WordPress
- This is a system of two scripts, and a copy-and-paste DB query - fast, but not as fast as it could be
Future plans:
- Make this into a full-fledged plugin that does it all easily with a few mouse clicks, some fill-in-the-blanks, and maybe some Web 2.0 b.s. thrown in to impress people (or not)
- Integrate more than one merchant datafeed onto a site
- Automatically hide the fact these are affiliate links (right now, I don’t even do that! Gahhhh!)
- Optionally, scrape the merchant(s) site(s) for more products. Most merchants seem to hold back on the amount of products they present in the datafeed. Also, datafeeds are often out of date. This is not acceptable, people!
- Make this future plugin available. Maybe. If you guys are interested.
- Automatically post a random product’s profile page as a regular blog entry, on a schedule or as drafts. This would allow each product to get a “review” post, where I can type in a few sentences about the product.
So I plan on working on this a bit more, and possibly posting a URL here to show the results.
It’s not a groundbreaking new idea, but it’s an idea that works well to solve a problem I had with Shareasale - no “good” way to seriously deploy my affiliate links. So hopefully it works well in that way, and I can improve the script soon and share the results here.
Popularity: 24% [?]
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags: ShareaSale
Here’s a post I’ve been thinking of for a while, and I dedicate it to all the people who need a little polishing up…not that I think less of you, but you just need to learn a few things. (And for the rest of you out there, have a good laugh.) There are people in the world who just need a bit of basic instruction.
I give you the guide on…
How to Properly Leave a Job
In everyone’s life (man, woman, and also transgender), there comes a time to leave a job. For some people, this means leaving of their own free will and bravely adventuring on to more challenges that hold greater rewards and hotter chicks. For others, it means they got fired for being a dumbass. But everyone leaves a job at some point. [This short guide will solely speak to the latter category of job-leaver, as they are the ones in need of such a guide.]
Part 1 - What NOT to Do
Don’t throw a tantrum. Don’t get all mad and whiny when you get yourself fired. And don’t throw a tantrum and complain. Don’t demand things from your new ex-boss. Don’t scream foul. Don’t figuratively “throw yourself on the ground” and have a tantrum. Don’t have an actual real tantrum like little Johnny here.

No one is impressed.
Don’t get mad at your boss/coworkers/life/God/lunch/the humidity/etc. Realize that you were the one who caused your own self to get fired. Stop blaming other people, dingus. Out of all the people I’ve ever known who complained about getting fired (or even got fired at all), they were people who 1) Had bosses who “didn’t like them” and 2) Get fired from numerous jobs. If you see a resemblance you YOU there, grasp the knowledge that you might have the problem. And you need to change your behavior. (Or, you can continue to be a loser.)
Don’t complain, especially not in public. It used to be that when someone wanted to complain, only those closest to them (or those sitting next to them in the bar) had to hear their garbage. Now, with the advent of blogs, complainers can voice their opinons publicly. Alas, however…people still don’t wanna hear it. (So no one usually reads/comments on their blog.) But the worst thing about complaining in blog format is that next time you attempt to get a job…guess what? You’re bound to look either crazy or look like a whiny-baby when your potential employer Googles your name. Doesn’t matter if you’re right or not: you still look like someone with problems, and are less likely to get hired.
Part 2 - What TO Do
Leave quickly. That’s right, when you get fired just pack up your stuff and leave the premises. Grab your coffee-cup warmer, get your tupperware, grab your goofy hat, and just go. Don’t hang around, don’t argue with the boss, and don’t drag it out. Retain your small amount of dignity and just go.

Leave people alone. Leave your company alone. Leave the boss alone. If relations were lukewarm/unfriendly with your coworkers, leave them alone too. Don’t email them as an excuse to dig back at your boss with snide comments you hope get relayed. Don’t email the company and pretend you’re a customer or a website visitor so you can say “Your site sucks!” or whatever. The whole staff will only make fun of you later, for being a dumbass (an obvious dumbass, at that).
Leave the company alone and find a new one. Focus your attention on getting yourself a new job with a new company. Forget your past - it’s done and over with. You didn’t work out for whatever reason. So deal with it - you messed up. Now get your act together and go somewhere else.
When you get a new job, do what is reasonable. That means, do what they say to do. And don’t do what they say not to do. (Should be easy, right?) They are paying you to do things for them on their time on their premises, so just do what they say. Don’t try to run your own little side-venture while you’re on their time. Don’t dink around for hours on end when you’re supposed to be accomplishing things for your employer to make them money. Just do your work, and act like employees are supposed to act.
Be nice, and act right. This means you should shower daily so you don’t stink at work, you should speak politely to your co-workers, and you should respect your boss. In contrast, this means not saying things such as “Duh” to your boss when they tell you something (you think) you already know. It means not taking advantage of the generosity and kindness of your employer. It means not talking down to your co-workers. And it means considering the opinions of everyone and not behaving like a know-it-all.
All the normal people out there know (or have had to interact with) someone who needs these bits of advice. You wonder, “How will they ever make it in this world?” as you see them act like fools. Well, who knows if they ever will make it. I just hope they follow at least some of my advice. It is their only hope!
Popularity: 6% [?]
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags: Advice & Inspiration
I know, I know…”starting a web hosting company is too hard” and “trying to make it as a webhost is a waste of time” because “everyone’s tried it”. (I could put more random phrases in quotes, but you get the point.) It would be like trying to start an online auction company - there have been a billion people who’ve already tried it and failed. Why? Because the concept sucks? No. Because no wants wants to use services like that? No. I’ll tell you why: because more well-established companies have already beaten people to it, and established a foothold.
Not better companies run by smarter people offering more helpful services necessarily. It’s just that they were there first.
eBay is a superb example of this. I will tell you point-blank that eBay absolutely sucks. They are a company which, if they were human, would deserve to get their ass kicked. And if that happened, people would applaud. Because they suck. But they were there first.
1and1 is another company which I hate with perfect hatred (to get all Biblical on you). They must die. They are scumbags. No, they are something worse: I hereby coin the phrase pussbags. That’s what 1and1 is. But they do tons of business. Why? Because they were there first. (Well, one of the first to get big, anyway.)
So how do you succeed as a company in an industry in which there are tons of other players with lots more money who’ve been there first? There is one very simple answer to that: differentiate yourself.
You want to know what that means. Okay, that’s fair. Because what I just said is the type of thing you read in motivational books and business success books yet never are told how to do. So here’s a real example of a company that did that. They aren’t “bigger” or in any discernable way actually “better” and they’re not even really “revolutionary” or different than their competitors in any big ways. Except for one detail.
Compucast Interactive is a New Orleans web design company. They make websites for people who need sites. They host the sites. They’ll even get you the domain name and do all that stuff for you if you don’t know how to use GoDaddy. But they happen to be very very successful and quite well-known in New Orleans. Michael Chertoff (yeah the Homeland Security guy) even wrote about Judy Weitz, the owner because he thought Compucast was so rad. So what did Judy Weitz and Compucast do that was so nifty? Here’s what I see:
- Specialized in one industry. Compucast, from the beginning, aimed toward a couple of specific areas when it targeted clients. They were the hotels and the restaurants (basically, the “hospitality” industry). They even build proprietary applications that they allowed these clients to use (for booking, reservations, etc.) and guess what? When a few of the cool kids signed up, everybody started doing it (just like drugs, guys!) and soon many of New Orleans’ restaurants and hotels signed up because that was what Compucast was known for.
- Offered specialized services. As I mentioned above, they built apps just for use by the clients they targeted. This is worth mentioning here so that I can throw another nice bullet point up. It’s also worth mentioning because it is a truly awesome strategy even if you don’t want to aim at an industry - it could be something “general” that you offer to all your clients. But if only you have it (whatever “it” is) then you’ve instantly gained yourself the label of “Different” (which can be worth $$).
- Stayed the course. Compucast Interactive was there before Katrina (you mighta heard about it - it was a storm that just missed New Orleans), during Katrina, and are still around. That tells current and potential clients that this is a company that will not go away. Reliability and responsibility are things that people will think of for quite some time when they think of Compucast. So think about that in your ventures: when you hit hard times and challenges, sometimes just not giving up will make your business worth more money in the future.
- Showed up their competitors by doing good. Yeah, I love it when I appear to be awesome and other people look like pathetic losers. And that’s what Compucast did back in 2005 when, during Katrina, other webhosts went down like a….well like whatever goes down fast. Compucast had servers in other places and kept all their clients running, and then they started offering free web services to agencies who needed it, and it ended up they looked like heroes for helping people. And those people remembered it later. And no doubt, Compucast got some $$ and is still getting business as an indirect result of doing good things when people needed it.
There are obviously other companies in New Orleans who offer web design and do web hosting, etc. And probably a few of them are really cool, great companies who do great work. But the lessons I learn from looking at what Compucast did are really easy to implement for a guy like me who might not have a huge advertising budget - this is free stuff that anyone can apply in almost any business. And the cool thing is these things can make you a giant in a highly competitive field of well-established businesses.
Popularity: 15% [?]
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags: Business Profiles
My sister works for a local company here in the New Orleans area. This company is in the process of opening up some new restaurants and cafes. They are new to this kind of endeavor, having gained success and money in a totally different arena.
I don’t mean to criticize just to be a jerk. But this company sure does things in a haphazard and disorganized fashion.
They opened up a bakery cafe about 6 months ago, with plans to open up a few more restaurants. They hired dozens of managers for the four or five different eateries before they all opened. So from the very beginning at her new job in the bakery, at least a dozen or more managers are all arguing over how things should be done, though most won’t even be staying at the bakery but are waiting for their restuaraunt to open. Employees have come and gone. The menu has been changed a few times. Prices have been raised. It’s very chaotic.
Just last week, the second restaurant opened. And while the food was mostly good, it was mass confusion. There’s a wok station. A pizza station. A salad station, and the regular menu. It was overwhelming. They are trying to offer too many varieties of food, like a cafeteria, but more upscale. Is it a restaurant or a cafeteria or a Whole Foods? Can good pizza and good noodles be made in the same place? How do you order your food? I am sure they have a few kinks to work out since this place just opened.
But when it comes to running a business, it really is better to be a master than a jack-of-all-trades. Focus your energies and efforts. Find your niche. Be a Master in your trade. You will develop a stronger business sense and avoid unnecessary confusion and wasted time and money. Be the best at what you do in your particular craft, not some handyman who does a little of this and a little of that.
Then after you are established and things are running smoothly, then consider expanding into other areas or even another business. But trying to do too much too soon will only serve to overwhelm you.
Build momentum. Focus. Succeed.
Popularity: 36% [?]
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags: Advice & Inspiration · Business How-To's · Leadership · Running a Business · Self Employment News · DIY Life
Fatal error: Call to undefined function: lw_showads() in
/home/dollars/public_html/wp-content/themes/Cutline 1.1/index.php on line
32