Send and Receive JSON POST Requests with PHP

Posted by Methylated on September 19, 2012

function postback($url, $params, $optional_headers=null, $decode=true) {
  $params['cluster'] = true;
  $params['handshake'] = HANDSHAKE;
  $params['url'] = $url; //BLOG_URL;
  $params['remote_ip'] = $_SERVER['REMOTE_ADDR'];
  $data = http_build_query($params);

  $options = Array('http' => Array(
    'method' => "POST",
    'header'=> "Accept-language: en\r\n".
       "Content-type: application/x-www-form-urlencoded\r\n",
       "Content-Length: " . strlen($data) . "\r\n",
    'content' => $data));

  if ($optional_headers !== null) {
    $params['http']['header'] .= $optional_headers;

  $ctx = stream_context_create($options);
  $fp = fopen($url, 'r', false, $ctx);
  if (!$fp) throw new Exception("Problem with URL '$url' {$php_errormsg}");

  $response = stream_get_contents($fp);
  if ($response === false) throw new Exception("Problem reading data from $url, $php_errormsg");

  if ($decode) $response = json_decode(rawurldecode($response), TRUE);

  // Invalid query? 
  if (!isset($response['handshake']) || ($response['handshake'] !== HANDSHAKE)) 
    return NULL;

  return $response;

CMS Platforms You Should Know Inside Out

Posted by Methylated on August 31, 2012

These are 3 of the most popular Content Management System (CMS) platforms everyone trying to make money online should become familiar with. WordPress, Magento, and Drupal. This is not a competition between these CMS platforms, but common places where each CMS would be ideal.

In the text is an activity to get you up to speed with each CMS. Each activity will be to install the CMS, build an example site, add content, install and setup a theme, and install plugins for some customization. The activities here are essential to learning the CMS because they handle common client requests and get you up to speed right away. They are not in-depth technical tutorials because enough of those exist online already. Some resources will be included.

While the activities do require you to search Google to figure out the next step, the knowledge and experience acquired is beneficial, especially to developers who can customize each CMS, sell plugins, and so forth. Designers benefit from learning each templating system and selling themes or widgets for each CMS.¬†Even if you’re neither, just installing, administering and upgrading a CMS for clients can be a decent fulltime job if you’re willing to push yourself to make the example sites listed for each platform.

To learn, attempt the following exercise before going with each hypothetical user-case below.

  • Install CMS on your server
  • Login to admin panel
  • Install a recent theme without sample content.
  • Add in real content so your site matches the “live demo” of the theme you installed
  • Setup or install plugins to do the following:
      Have a working contact form.
    Make sure RSS feed, sitemap, and SEO URLs are up and working for each theme
    (use plugins for some of these.)
    Customize the logo.
    Make sure slider works (if available in your theme.)

WordPress: WordPress is a robust, intuitive and mature CMS initially built as a blogging platform. Ideal for blogs, small to large static business sites and online portfolios, lightweight e-commerce (handful of items, low traffic), for those looking to build a site around a specific subject (an information site), or for a light CMS to be used as a backend to your landing pages (though specialized CMS’ for this do exist.)
Magento: This open source app is a beast for handling high traffic heavyweight e-commerce sites. While WordPress or Drupal may perform well as eCommerce solutions for sites selling a handful of projects, Magento is fit to handle thousands of products and hundreds of categories, with features like tiered pricing, upselling/cross-selling and everything you would expect in an ecommerce CMS.

This PHP platform features superb inventory management, support for numerous payment gateways (>50), full customization of your store and the ability to build unlimited stores over a single inventory system. One of the best solutions for tackling a big e-commerce project.

Magento uses an XML based templating system that is difficult to adapt to at first, but in the market right now offers an exciting source of revenue for teams willing to theme this CMS.
Drupal: This is a PHP based open source CMS ideal for sites that offer a bit more interactivity than WordPress. While plugins exist to do practically anything in WordPress and Drupal, the latter is built with security in mind, support for user management, to be continued…


Marketing Your Custom Layout/Template Online

Posted by Methylated on August 27, 2012

Post your template on any or all marketplaces and forums that contain marketplaces. Be sure to read the item submission rules of each location to make sure you aren’t violating their rules by posting your layout in multiple places (unless you are posting it there exclusively.)

This includes the Envanto marketplace (i.e., ThemeForest), Digital Point, Warrior Forum, WickedFire, and SitePoint. There are new ones constantly popping up. Use your online marketing knowledge (aka your ability to use Google creatively) to find one new places to post your site or buy media space on a regular basis.

Create a small site rich in content about your layout/template in general. List it in different formats that apply to your layout to reach a wider audience. For a resume template, we may use HTML, PDF, ODT, INX (and other InDesign formats), DOC, and so on.

Once you have 4-5 templates on your site with a reliable support/payment system in place, begin finding places to buy media on to send traffic to your site. You may advertise it on Adwords, Bing/Yahoo, forums, Facebook and so forth. Who you’re going to advertise to will have to depend on who bought your layout’s existing templates. There’s a good chance that’s a good place to start, but this is very dependent on your product and many other factors. The key here is split testing as much as you can until you’re profitable, and then scale vertically or horizontally (or both.)

Making Money Writing College Papers

Posted by Methylated on August 23, 2012

(in draft)

Selling Scraped Content to Make Money Online

Posted by Methylated on August 21, 2012

One (of many) popular technique for developers to make money online is to scrape archived content, slap a decent layout on it or make it a WordPress plugin (do both,) then sell it. There are more buyers than developers who do this, and one can get almost all the work outsourced. Most people will not hit it big and will earn (in my experience) anywhere from $20-$50k/year. What’s sweet with this is each site is cut and paste. The developer isn’t so much programming in the sense that they are an engineer, but piecing together cookie cut copies of a specific plugin or template that they believe will be either the Next Big Thing or can be done in enough time to ride this wave of trends out.

Sales happen on Envanto’s marketplace, social networks, on “making money online” forums like SitePoint and WickedFire, and on a dedicated website promoting and selling the software by affiliates and the developer. The higher tiered technique is to build a marketplace for this cookie cutter content. While the sources I mentioned sometimes offer quality products and at very cheap prices, the trends are late in the game if you expect to earn a living doing this. The key to starting and maintaining this business is to create and release superb products. Developers must realize that design matters and that they can’t lay their eggs into one basket like plugins and themes for only one or two CMS markets. The wordpress, joomla, drupal, magento, and zencart markets are saturated. Can you make good money? Sure, especially Drupal and Magento right now.

This business model improves your focus on upcoming trends in software. You begin to see everything as being able to make money if you “just” turn it into a plugin for WordPress or design a new template. You begin to see trends in the area between people who sell other people’s software for a living, and people who’s business is primarily to host a gathering of buyers and sellers, digitally or otherwise.

Making Money Selling E-Books

Posted by Methylated on August 04, 2012

Can you make money just selling what you know? Maybe.

When most people hear the word “ebook”, they imagine having to write a table of contents, an entire 250-500 page book, along with designing a back and front cover. Perhaps the book would require illustrations too. In reality, it’s more accurate to imply that “ebook” just means a words you’ve written that somebody can read on a screen or print out. The closer you aim for writing a real book in terms of content, the closer you are to building a lasting quality product. This means the book becomes 80% research and 20% writing or illustrating.

Authoring an ebook is no more work than writing text, putting the title in big letters on the “cover page” along with your name or alias and diving your content into logically defined parts. Start with talking about the topic, make some points and then dive into each point in a separate “chapter.” Don’t flake on the content and you might make a few sales.

Actually know you what you’re talking about. Sell your knowledge.

Don’t write get-rich-quick scheme such that the point of the book distills to “do exactly what I did.”

You can make your book interactive using Adobe Indesign, or you can use anything from Microsoft Word to Adobe Acrobat to export to PDF. I don’t recommend anything other than PDF because of its strong portability. I’ve seen “ebooks” come in .txt or .doc files.

Make $10,000 a Day Working From Home!

Posted by Methylated on July 29, 2010

The only way to get rich quick is to rip off other people trying to get rich quick by offering them some bullshit, non-working way to get rich quick.

How to Do PPV Research Conveniently

Posted by Methylated on December 30, 2009

PPV (AKA CPV), though certainly not new, has been gaining attention in the AM scene lately. For doing market research, you can install ad supported software such as VombaToolbar on your computer to see exactly what ads the user is seeing. There are a few issues associated with this approach. Mac and Linux marketers may not be able to install these apps on their OS. But even if I was on Windows, and even though adware isn’t exactly spyware, I don’t want any of it on my machine. I used to write spyware and adware, and while I feel confident in understanding how these apps work internally and in how secure they are, I just don’t want anything extra running in the background. There are a few solutions for this.

I can dual boot, meaning install another OS on my machine, and reboot to go into it, do some testing, and then reboot again to go back into my primary OS. I never reboot (literally) unless I absolutely have to, because I hate closing my gazillion Firefox tabs (which I’ll probably never get to anyway, but that’s besides the point!) – so this isn’t ideal in my case.

Another solution would be to have a dedicated machine specifically for testing. This is OK, especially considering you can buy a Dell desktop for a few hundred bucks, conveniently preloaded with spyadware. I have enough machines running already, and don’t like the idea of having another box taking up space.

What to do? Virtualization. You can run another OS sandboxed inside your primary OS. This means I can work as usual in Mac or Linux (or Windows), and when doing research, run a program which will load a new instance of Windows inside a window, which I can install adware in, do my research, etc and then close (simulates a shutdown). Besides the convenience of not having to reboot or run another machine, I can load multiple OSes simultaneously – XP, Vista, 7, etc.

This is done using software like VirtualBox, or VMware. After installing these, you will of course need a Windows CD/DVD (or you can mount an iso) to install the OS. There are others,

VMware Fusion (Mac)
Parallels (Mac)

Having Trouble Finding Keywords? Zoom Out.

Posted by Methylated on May 16, 2009

When building your keyword lists, it’s easy to begin subconsciously thinking of your prospects and leads as keywords and phrases instead of real people. Keep in mind that you’re targeting a demographic, as opposed to specific keywords.

Don’t ask yourself what keywords would people looking for ProductX type into Google? — Instead, begin asking yourself what problems are people looking to fix, that ProductX might be a solution for?

Notice in the question that problems is plural. When targeting, aim much wider than the specific niche it caters to. You’ll be surprised what keywords end up converting.

(The following examples are simple, but effectively get the point across.)

If you’re targeting spyware, then there are likely many people who have no idea what spyware is, and are just looking for information on why their computer might be slow, or why their home page keeps changing every time they close IE.

What would somebody who might be interested in bizopp offers search for, besides “making money at home”? Perhaps a better job, or a professional resume writer. Maybe info on options for paying a tuition, or tips on how to save money.

How to Turn Prosper202 into a Desktop App

Posted by Methylated on May 03, 2009

prism 300x174 How to Turn Prosper202 into a Desktop App

Sites and web services that you use constantly are better taken out of the browser and made individual processes on your desktop. This means that when you close the browser, or if it crashes, the sites you’re running individually (prosper202 for example) will not be affected. This is a major problem because nowadays we do most of our work in the browser.

Google Chrome solves this problem by making each tab/window an individual process. The problem with Google Chrome is that there really is no need to have the entire browser running just to view 1 site, which may be static. Instead, look into some of the apps created specifically for this task. These are termed Site-Specific-Browsers (SSB)s, and they’ve existed for a few years now.

There are alternatives but I use Mozilla Prism (or any of the alternatives). Prism is basically a minimal browser which is intended to display one site only (per instance of Prism). It also creates a desktop/start menu icon to quickly open that specific site/web app.

An excellent example of a web service that should be run off the browser is Google Calendar. I have this turned on full screen 24/7 on one of my desktops. I can restart Firefox every time it begins exhibiting its annoying memory leak feature, and the calendar will remain open and fast. Some other great services to keep running are your prosper202/tracking202 accounts, PPC accounts,, and maybe some forums you frequent often.