Wednesday, August 16, 2017
Home Code

Code

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

Poor mans GeoIP – Quick and Easy Geolocation

//poor mans geoip $country=trim(file_get_contents("http://api.hostip.info/country.php?ip=".$_SERVER)); //You can then redirect customers to different offers depending on country. I wouldn't recommend this for critical or high volume use. if ($country == 'MyCountry') { yadda yadda yadda; }

Bing URL Ripper for Dorks

This is a URL ripper which uses bing to search for a dork i.e. "powered by wordpress" and output a list of thousands of wordpress sites. This example was actually setup...

Google Friendly Mobile Pages Test

Google have provided a tool which checks to see if a site renders clearly in a mobile browser. The tool looks like it is setup at 320px and if your site...

Block bots and crawlers with .htaccess and robots.txt

If you want to block search engine and crawler bots from visiting your pages you can do so by uploading the following files to the / directory on your site. Double...

Loading a conversion pixel on click through

Mobile campaign optimisation throws up a number of issues in regard to tracking. One thing I've found really useful is to load a conversion pixel on click through from the landing...

Rotating Offer Pages and Landing Pages in Prosper202

It is really easy to setup rotation of urls in Prosper but if you actually want to track which url is doing better or you want to test different landing pages...

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...

Mobile Multivariate Testing with SubID’s

Due to slow page load speeds it is advised to keep tracking software to minimum when running mobile campaigns. This caused me a problem when trying to develop and optimise a...

iframe to a specific div id on a landing page

Below is the code to iframe an offer page but cut out all the stuff you don't need. This is useful if you just want to iframe the form while using...

Coding PHP for Affiliates | A Getting Started Guide

Coding for me is one of the most important skills you can have as an affiliate marketer. I've met plenty of affiliates that are running huge volume, making millions and can't...