Saturday, October 21, 2017
Home Code

Code

A place for code php, ruby, javascript, jquery, html, css etc.

node moz api

Node.js client for Moz API (MozScape)

I was doing some work with SEO domains and realised there wasn't a node.js client for the MozScape API... so after Googling and not finding what I was looking for I...

Regex’s | Regular Expressions in Programming

Today I saw a nice script which redirects mobile traffic by searching the useragent string for a list of search terms related to mobile devices. This is PHP but I'll show...

Wasabi Opensource A/B Testing Platform

Intuit have opensourced a enterprise grade A/B testing platform called Wasabi. This runs as an API on a separate server from your site/landers. It isn't the easiest thing to setup and will...

How to display different banners for web/mobile

Adsense's flex box has made it really simple to put in a piece of code which adapts to the size of available space. I had a situation where I wanted to...

Captcha Cracker For PHPBB written in Ruby

It's been a while since I've done much in SEO so I am going to start publishing some of my old scripts. This is a captcha cracker which uses gocr and...

Pop Under Code 2017

This code is used for running pop under traffic on your own site. It adds an onclick function to every link on the page which opens a new tab with the...

Alert box on click through to offer

The following example will allow you to create an alert box when the user clicks through from your landing page to the offer page. This can be useful to remind users...

A simple iOS / Android traffic splitter in PHP

The following basic PHP code will split traffic by device with iOS traffic going to the first out link, Android to the second and leftovers to the third. <?php     $ua = strtolower($_SERVER);   ...

Big list of Cordova/Phonegap Plugins

I needed a big list of Cordova plugins to search through: android.support.v4 This is a Cordova plugin that adds the Android Support v4 client library. It is meant to be depended on by...

Passing URL parameters (GET variables) on a PHP redirect

This was something quite simple that shouldn't have taken me as long as it did to figure out. I had traffic going to one url: http://myserver.com/lander.php?source=google&campaign=no1&c1=foobar I wanted to split the traffic to...