Category: Code

Google Friendly Mobile Pages Test 0

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 works at this you’ll get a “mobile-friendly” tag in your organic search listings. Here’s the link to check your sites: https://www.google.com/webmasters/tools/mobile-friendly/ Some other good sites for checking across different screen sizes/browsers are: http://validator.w3.org/mobile/ – Validates markup, I always have...

Passing Through Landing Page Variables 0

Passing Through Landing Page Variables

This was inspired by another post which is well worth a read at: http://affplaybook.com/blog/affiliate-marketing/the-ultimate-guide-to-landing-page-tricks/ So many traffic sources provide you with tags such as {keyword} {countrycode} {device} etc. You can add these variables to your url so it would look something like: http://www.myserver.com/landingpage.htm?kw={keyword}&device={device} Then in the code to your landing page you can access these variables. I’ll put examples in PHP and Javascript but any web based language should provide...

Big list of Cordova/Phonegap Plugins 0

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 other plugins. android.support.v7-appcompat This is a Cordova plugin that adds the Android Support v7 AppCompat client library. It is meant to be depended on by other plugins. android.support.v7-mediarouter This is a Cordova plugin that adds the Android...

Email Bounce Handling 0

Email Bounce Handling

Here’s some PHP code developed to handle bounced email responses. This will give each response a code to $resno and a category to $rescat. There are 4 categories: Unknown – Hard bounce user or email address isn’t valid Spam – Soft bounce, blocked by spam filters Full – Soft bounce, user is out of resources or inbox is full Block – Soft bounce, IP/Domain is being blocked for SMTP connections...

0

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 write a single line of code. “I just outsource it all” but for me I couldn’t imagine coming up with a tweak to a landing page or a new concept and not being able to impliment it there and...

Direct Linking and Retargeting 0

Direct Linking and Retargeting

Here is how to do it, you’ll still need a server and a domain. Point all your traffic towards a php file i.e. http://www.mydomain.com/trackandforward.php Then place all your retargeting pixels in to the trackandforward.php file and put a meta refresh at the the end. The page will load the retargeting cookies will be placed and then the user will be sent on his way to the affiliate offer without even...

Automatic backup of MySQL database 0

Automatic backup of MySQL database

Would you like to have a backup of your critical MySQL database emailed to you automatically? The following script was moified from backup2mail and needs setting up as a cron job, instructions are in the code. Download it for free here This is what the code looks like: <?php /// Setup /// // Test it in a browser first and make sure it works. // To set it to run...

0

Stupidly Simple AB or Multivariate Testing

Here’s a simple way you can setup a simple multivariate or A/B split test without any software just using the subid variables provided by an affiliate network and some really basic php. <?php $out = ‘http://www.myaffiliatelink.com/page1.php?affid=123&subid1=’; if (rand(0,1) == 0) { $out.=’g1′; $girlimg = ‘1.png’; } else { $out.=’g2′; $girlimg = ‘2.png’; } // this randomly chooses an image and adds either g1 or g2 to the outlink. if (rand(0,1)...

Redirection Methods and Referer Passing 0

Redirection Methods and Referer Passing

The following are some methods you can use to redirect users from one place to another. I generally use 301 redirects for anything where I want the referer passed through because this is the fastest. Double meta refresh for anything where blank referer is important and a custom script which incorporates the form submit redirect to fake the referer where this is necessary. Getting the right redirect is important to...

Combining Maxmind GeoIP with Google Maps iFrame 0

Combining Maxmind GeoIP with Google Maps iFrame

This is a quick script which uses Maxminds geoip location db downloadable for free from here with Google Maps iFrame. I haven’t tested this enough to find out if Google restrict the number of requests by referrer but you could always put a meta refresh page in the iframe to blank the referrer if thats a problem. <?php // you might have to change the first three lines $gpath =...