Post to Wordpress Remotely With XMLRPC in PHP

Posted on June 27th, 2008 in Automation, Coding

If you're tired of refreshing this page every day like a d-bag, you should probably subscribe to the RSS feed.

One of Nickycakes’ first projects making cash online started a little less than a year ago and was not much more than an autoblog system that would post articles to wordpress every day.  This thing was the worst piece of memory hogging spaghetti code you’ve ever seen and eventually caused The Great Nickycakes.com Blackout of 2007.  Since it was kinda running on autopilot and the Cakes had so much other crap going on that was making more than the $1 a day or so in adsense revenue that this little script was getting, he just let the thing die and forgot about it.  Having learned quite a bit since then, Nicky has realized that there were many things that were done bass-ackwards that could have been simplified.  One of them was the complete mess of code that was used to make posts to wordpress.  The script actually ran as a wordpress plugin and used WP’s own internal functions to make the posts, which is completely retarded and requires that the script be running on the same machine, which will surely cause you problems if you’re running 100 poorly written memory/cpu hogging scripts on the same shared hosting.

Now armed with a little more knowledge of wordpress and a better general understanding of how to do things properly, the obvious solution to this problem is by posting to wordpress with it’s built in XMLRPC server.  Wordpress lets you submit a simple request, formatted in XML with the login and post details, and your post magically appears on the blog.  This would prove extremely useful if you were to create an army of blogs on different shared hosting accounts and had them all controlled by a central server feeding them the post details.

Anyway, if you were ever inclined to build such a system, or have some other project in mind that needed to send posts to wordpress quickly and easily, here’s a simple 15 line php function for you to do just that:

function wpPostXMLRPC($title,$body,$rpcurl,$username,$password,$categories=array(1)){
$categories = implode(",", $categories);
$XML = "<title>$title</title>".
"<category>$categories</category>".
$body;
$params = array('','',$username,$password,$XML,1);
$request = xmlrpc_encode_request('blogger.newPost',$params);
$ch = curl_init();
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
curl_setopt($ch, CURLOPT_URL, $rpcurl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 1);
curl_exec($ch);
curl_close($ch);
}

This function requires that you have the php xmlrpc and curl modules enabled in php.ini.  $title, $body, $username, and $password are pretty self-explanatory.  $rpcurl is the XMLRPC server address for your wp install.  It’s generally located at http://www.yourblog.com/xmlrpc.php .  $categories is an array of the categories you want the post filed under, and defaults to category 1 which is Uncategorized in the default wordpress installation.  You can most likely use either category numbers or names in this array.

Enjoy.

Published by nickycakes // 9 Comments »

ASE Fishing Cruise w/ Advaliant and Cakes Contest

Posted on June 25th, 2008 in Affiliate Marketing, Retards

Ok, here’s the deal.  Advaliant is having this fishing cruise trip in Boston on Saturday, Aug 9, which is the day before ASE officially begins.  They invited a bunch of their top affiliates and it looks like it’s gonna be a really good time.  It’s pretty much going to be an all day thing.  They pick you up at the conf hotel at around 11, shuttle everyone to Plum Island which is near Newburyport, MA, a beautiful spot about 45 mins north of Boston.  There will be a 4 hour fishing cruise/whale watching/drinking thing, followed by dinner in Newburyport.  Then everyone will get shuttled back to the hotel around 10, just in time to go hit up the club with Cakes.

Anyway, there are a few spots left and they asked Nickycakes if he would either suggest some people to fill the spots or come up with a contest.  Having made so many friends in the industry lately, it seems wrong to play favorites, so it’s gonna be a contest.

This time around, though, it won’t be based on performance.  You will have to be signed up to Advaliant, although you don’t need to be referred by me or anything, they will just need your contact information if you win.  But you should be signed up to them anyway because they are so rad.  Click here to do so.

Contest Rules:

  • Go to digital point forums, find the most retarded post on the forum, and leave it as a comment here.
  • Be sure to use your correct email when posting the comment so Nickycakes can get ahold of you if you win.
  • Winners will be decided by vote in a week or so after the Cakes installs some decent wordpress voting plugin.
  • Feel free to participate even if you can’t make it to the cruise, just make a note of that in your comment.

Have fun, keep it real.

Published by nickycakes // 18 Comments »

Should Affiliate Managers Run Their Own Campaigns?

Posted on June 24th, 2008 in Affiliate Marketing

When Nickycakes signed up to his first affiliate network, he had a lot of questions.  One of the first ones was something along the lines of, “Do you have experience doing PPC campaigns yourself?”  The answer was no.  He said his company wouldn’t let the Affiliate Managers run their own campaigns.  It made sense at the time, so the Cakes figured this was the rule at all Affiliate Networks across the board.  WRONG.

At some networks it is perfectly OK for Affiliate Managers to run their own PPC Campaigns.  It’s up to the company to decide the rules for the Affiliate Managers, after all, and most justify the decision as good experience for the AM which will allow them to better guide new Affiliates.  Great for new affiliates, not so great for experienced ones.

There are already plenty of reasons not to trust Affiliate Managers in general.  (Please keep in mind that this doesn’t mean they are ALL untrustworthy.  Nickycakes has great relationships with many of them.)  These reasons have been detailed in a few past posts, but the major one is that by sharing the campaign data of a successful affiliate with all the unsuccessful affiliates, they can generate more income for themselves since they’re working on commissions.  This means that there is almost no incentive for the Affiliate Managers to keep your campaign info private other than the extremely unlikely event that they will lose you as an affiliate if by some miracle you were to find out about it.

But Affiliate Managers running their own personal online marketing campaigns can add a whole new level of distrust to the game.  Any information you give to such an Affiliate Manager about any of your campaigns, can and will be used against you, period.  Sharing any of your campaign info with an AM does absolutely nothing to help the affiliate at all, and it’s a complete shock that they, most of the time, just give the info up like it’s a normal thing for your AM to be asking you what keywords are yielding the most profit.  Seriously folks, get a clue.

Countless times, Nickycakes has been asked like…”Yo, why does my AM at X network keep asking to see my landing pages?” or “My AM at  X network wants to put a tracking pixel on my landing page, whats up with that?” or the absolute best was “My AM suggested I send him the list of keywords I’m using so he can help me come up with some better ones.”  Seriously, how do you people sleep at night?

So what information are you required to give to your affiliate network?  F-ing NONE.  NADA.  Do not tell them ANYTHING unless it’s a matter of you getting paid your commissions or not, and even then you had better raise a big ass stink about it.  You should be cloaking your referer data, because if you don’t do that, all your traffic sources and keywords are there for the affiliate network and merchant to see, plain as day.  If you’re unsure how to do this, the prosper202 (or tracking202) software will do it for you, for free, as well as track your campaigns really damn well.  But yeah, your AM’s don’t need to know ANYTHING about where your traffic is coming from, period.  If they give you a reason such as “The merchant is unhappy with the lead quality.” and you have been running the campaign for less than a month or two, they’re likely LYING.  Merchants usually take a few months to be able to get an idea of lead quality from a specific affiliate.  If they still insist on getting the details, go elsewhere.  There are hundreds of affiliate networks out there, and most of them have the same payouts and the same offers.  If you don’t know where to find a network that isn’t going to try to steal your campaigns, jump on irc and the Cakes or someone else will be able to point you in the right direction.

Alrighty, cue the deluge of msn messages the Cakes gets from his AM’s every time he mentions that some affiliate managers are shady.

Keep it real.

Published by nickycakes // 9 Comments »

What is Cloaking and How Does it Work?

Posted on June 23rd, 2008 in Cloaking

First off, Nickycakes would like to wish Nickycakes a happy 25th birthday.  Lets hope UPS doesn’t try to pull anything funny and leave one of those retarded yellow “sign me” slips instead of birthday gifts.  With the meager ad earnings from the blog wasting space in the paypal account, the Cakes decided to treat himself to a new flatscreen monitor to make the dual monitor thing happen a little better than it is currently.  Hopefully that arrives today.  Should make Call of Duty 4 look nice and purdy.  Also, check out this amazing article that took place the day the Cakes was born: http://www.wired.com/science/discoveries/news/2008/06/dayintech_0623

Anyway, back on topic.  What is cloaking and how does it work?  There are a few things in the SEO/Internet Marketing industry that are referred to as “cloaking” but today the Cakes is talking about search engine cloaking.  Cloaking is the staple of many a blackhat-seo, but the specifics are often misunderstood.

The basic idea is, you show the search engine bots something different than the user sees.  For example, Goog thinks your page is full of 5000 words of keyword rich content, but when joe blow clicks on your listing in the search engines, he is forwarded to an affiliate offer instead.  Pretty simple in theory, right?

So, why cloak? Can’t you just fit keyword rich content on your site and rank it in the search engines like normal people?  Sure.  But some people would rather auto-generate 10,000 pages of crappy barely-readable content with tons of keywords in the time it takes you to make/pay for 1/10th of your spiffy legit website.  The user never even gets subjected to your crappy design skills, they just get direct linked to whatever, while the search engine bots, and their limited sense of asthetic value, happily index the garbage.

Uhh, ok so how does it work exactly? Here’s the only real tough part about search engine cloaking.  How can you determine if a visitor is a search engine bot, a human, or maybe a manual reviewer person from Goog?  Well there are several ways.

  • UserAgent of the visitor is the most obvious.  This piece of browser stored data tells a website what software is being used to access it.  Many website crawling bots happily announce exactly what they are, making things easy.  However, these days this is unreliable.  The major search engines, especially G, love to use UserAgents that match normal users when checking up on sites, making this method not 100% reliable.
  • The Referer of the visitor is also sent by the browser when visiting a website.  This piece of data shows where the visitor came from to get to your site.  A referer of “http://www.google.com/search?q=nickycakes” will tell you that the user likely got to this site by searching goog for “nickycakes”.  So you can send anyone who ISN’T coming to your site with a referer from a search engine to your generated content.  Much like the UserAgent, this can be easily faked, so it’s not good to rely on this entirely.
  • IP Address is probably the next thing to look at.  Most people don’t know this, but you can look up the owners of ip addresses.  You can also look up what ip address ranges certain companies own.  The major search engines own a ton of them, and with a little digging you can find exactly what these ranges are as a starting point of who to show the bogus content to.
  • Your own list is the last, but probably most important thing you will need, and is also the hardest to get ahold of.  Basically, there are site indexing bots that are designed to look exactly like normal users in order to fool cloaking scripts and find blackhat sites to send to the ban conveyor belt.  They are, however, stupid.  The best way to make a list of incoming ip addresses that are bots requires that you have a site or sites that are indexed pretty frequently.  Basically you make a page on your site that records ip addresses and link to it from your site in such a way that a user would find it very difficult to find said link and click on it.  There are various ways of doing this so feel free to use your imagination for once.

With all this data, it gets pretty freakin easy.  You look at the data, determine if the user is likely a moron websurfer, and if so, send him on his merry way to your order form for whatever, mailing list signup, zip submit, rickroll, whatever.  If it’s not likely to be a normal person, you serve them your keyword rich awesome content, which then gets indexed in your favorite search engine.

Scripts that do exactly this are sold for thousands of dollars, and it’s pretty obvious that you can just save your money and do it yourself.  Obviously the Cakes isn’t going to post any source code for this type of stuff, because even if he had it, he wouldn’t want thousands of digital point retards running around ruining the internet, now would he.  Hopefully there’s enough info here for a bright person to get some ideas, but not enough to ruin the fun for everyone =))

Keep it real.

Published by nickycakes // 26 Comments »

Landing Page Design Tips From The Real Expert

Posted on June 21st, 2008 in Affiliate Marketing

Last februrary, the Cakes posted a vid done by “m0serious” aka “poetic prophet” aka “SEO Rapper” about paid search.  Looks like hes got some more material.

keep it real

Published by nickycakes // 8 Comments »

« Previous Entries / Home