James Bachini

Development

  • 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…

  • Simple PPC List Builder

    Simple PPC List Builder

    I used to use a programme called JAH Simple PPC to build out wordlists for pay per click campaigns. Basically it would combine different key word variations. I couldn’t find it anymore so decided to build my own and get a bit of practice with javascript. Hope this is useful to someone. http://www.jamesbachini.com/misc/ppc.htm http://www.jamesbachini.com/misc/ppc.htm The…

  • Ideas for improving landing pages

    The following is a list of proven methods that can improve the ctr and cvr of a landing page. Big Bright Buttons – Have you split tested different buttons, button text etc? Copy and Text – Persuasive text is key and an art form in itself. Images – Every image on that landing page should…

  • Using Google Fonts on Landing Pages

    This is how you can use Google web fonts on your landing pages, blog posts and web pages. The benefit of this is that the font is loaded from a remote server include on the Google APIs so it does not depend on the local storage of that font on the users computer. This makes…

  • 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…

  • Online Banner Design Tool

    Need to design/modify banners but don’t have Photoshop installed? Try this online image editor: http://pixlr.com/editor/ A great little tool for the affiliate that only does image editing once in a blue moon, you lucky souls. Pixlr – The online alternative to photoshop

  • Coding PHP for Affiliates | A Getting Started Guide

    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…

  • Pretty icons in vector format

    Download Font Awesome Vectors and spruce up your sites, ads and landers. Preview below:

  • 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…

  • 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…

  • Stupidly Simple AB or Multivariate Testing

    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…

  • 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…

  • 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…

  • Resizing images and adjusting landing pages based on screen resolution

    So many browsers so many different screen resolutions. Here’s a way to modify html code based on the screen resolution of the browser. In this example I have changed an image but there is no reason why you cant change text, font size or even use it to redirect users who have mobile sized screens.…

  • 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 page to the offer page. This can be a traffic source pixel which can then be used to give some indication of site/device/carrier quality…

  • 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 your own images etc. This is setup so you just enter the url and div id you want to jump to at the top…

  • 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 mobile landing page. Because I wasn’t using prosper or any other tracking software I couldn’t plug in my custom multivariate testing scripts. I was…

  • Prosper202 Mod – Set preferences before crashing server

    Had a bit of an issue with Prosper crashing once the database got too big. I would log out and leave the analysis preferences set to my biggest traffic source and when I logged back in the server would crash as it tries to pull a report before you can modify the search critieria. I…

  • What was that Country Code?

    Have problems remembering all the different country codes for geolocation scripts etc? Switzerland gets me everytime! Here’s a handy list you can use to check before you code. I use Maxmind but this will be accurate for any software that uses the ISO 3166 standard. AD = Andorra AE = United Arab Emirates AF =…

  • Ideas for Banner Ad Split Tests

    Here are a few ideas for split testing your banner ads. You could quite easily use these to take a single ad and knock up a 100 variations. Test them optimise out the losers and see what works best. There is no single best banner advertisement, everything needs testing and optimising continuously.

  • 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 to rip ning sites but you can adjust accordingly. Written in ruby for linux… #!/usr/bin/env ruby require ‘net/http’ require ‘uri’ class Search def search(search)…

  • Script.aculo.us – Interactive Landing Pages

    Interaction is key in modern web design and one of the tools I’ve found to be very helpful in making a more interactive environment is script.aculo.us It is basically a javascript inlcude which can provide you with a whole load of effects and functions to use on your landing pages. Check out a simple example…

  • UK Postcodes for major cities

    This is useful for PoF advertising. A list of postcodes (Zip Codes) for major cities in the UK. Can be used for all sorts of other uses, as you can see this was formatted for a php geo-targeting script. $postcode[‘London’] = ‘W1D1AP’; // use for england radius 75miles $postcode[‘Birmingham’] = ‘B46QS’; $postcode[‘Leeds’] = ‘LS18TL’; //not…

  • Direct Response Marketing Pushing CPC Prices Up – The Future for Google Adwords

    I was asked to setup a little campaign for an offline electrical company on “The Google”. The business they operate in is electrical testing or PAT testing as it is known here in the UK. It’s the kind of industry where I wouldn’t expect to find much competition when it comes to online marketing. That…

  • Ruby & Selenium Script to Check Google SERP ranks

    Haven’t used this in a while but it used to work really well untill google would throw a captcha at you after the first 5000 queries. Might be of use to someone. It’s designed for linux and you’ll need selenium up and running to work it. #!/usr/bin/env ruby require ‘rubygems’ gem ‘selenium-client’ require ‘selenium/client’ system(‘java…

  • 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 image magick to decipher phpbb captchas. It’s written in ruby and was designed as part of a backlink building module. You’ll need linux, gocr,…

  • 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 it can be a little more challenging. One way to do this is to set each url or landing page up separately and then…

  • My Favourite Buttons For Banner Design

    Below is a list of my favourite buttons I keep handy when designing banners. I’m a bit old school and still use Fireworks MX for design simply because I know where everything is on it and it does everything I want it to. After 6-7 years it would be really annoying to switch to Photoshop.…

  • Prosper 202 Mods 2012

    Prosper202 mods 1) increase session life – stops it logging you out every five minutes when you are trying to work add the following line just before session_start(); in 202-config/connect.php ini_set(‘session.gc_maxlifetime’,99999); 2) bypass adverts on first page – bit naughty but I prefer to jump straight into the spy section to see whats been going…

  • Custom Facebook Share and Twitter Tweet Buttons as WordPress Widget

    The following is the php code to make your own dynamic Facebook share and Twitter tweet buttons. Just place the images in the root directory and install the Samsarin PHP widget. Copy this code into a Samsarin Php widget and drag it to your sidebar. <a target=”_blank” href=”http://www.facebook.com/sharer.php?u=<?php echo “http://” . $_SERVER[‘HTTP_HOST’]  . $_SERVER[‘REQUEST_URI’]; ?>”><img…

  • Using Adsense Section Targeting

    If you are getting lots of Groupon and Three ads on your adsense niche site the chances are it isn’t optimised correctly. By simply writing a short, keyword rich, snippet of what your site is about and surrounding it in the following tags you can manipulate which ads are shown. <!– google_ad_section_start –> Jet internet…

  • Facebook Share button more effective than Likes?

    A recent post at SEOMoz suggested that their research has found a better correlation between facebook shares than Facebook likes. The full post is here and makes for an interesting read. One of the things that really caught my attention was in the comments and I quote: “After chatting with our Google rep it seems…

  • Custom WordPress 404 Page For SEO

    I have recently been purchasing used domain names from Godaddy Auctions and Dropcatch. When I get the domains the first thing we do is look at what traffic they were pulling for what topics via google cached web search. If there is some good content on there and things we want to keep we will…

  • Setting up twitter feed to post to Twitter and Facebook accounts

    If you don’t already have a facebook and twitter account for your company they are really easy to setup. On facebook remember to click the “Create a Page for a celebrity, band or business” link on the homepage. Once you have those accounts setup head over to twitterfeed.com and sign up for an account. Enter…

  • Setting up custom facebook and twitter buttons using php

    The canonical tag has been a god send for us helping to get pages indexed and clean up site structures. In many sites we use the same php variable for our share buttons. This is a great way to setup custom twitter and facebook share buttons for your pages. We always use an external template…

  • Mixing php with javascrip – Heredoc

    My main issue with javascript is the fact it is full of ‘ and ” which can be a real pain when coding. I’ve started using a method called heredoc to set a start and end point, example below. // Heredoc string // $sstring = <<<TEST Hello World TEST; The word TEST could be anything…

  • Poor mans GeoIP – Quick and Easy Geolocation

    //poor mans geoip $country=trim(file_get_contents(“http://api.hostip.info/country.php?ip=”.$_SERVER[‘REMOTE_ADDR’])); //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; }

  • Two php functions for scraping content and extracting links

    ////// Grab webpage ////// function webFetcher($url) { $crawl = curl_init(); curl_setopt ($crawl, CURLOPT_URL, $url); curl_setopt($crawl, CURLOPT_RETURNTRANSFER, 1); $resulting = $resulting.curl_exec($crawl); curl_close($crawl); return $result = $resulting; } //////////////////////////////// //// extract links //// function extract_links($text) { preg_match_all(‘/<\s*a[^<>]*?href=[\’”]?([^\s<>\’”]*)[\’”]?[^<>]*>(.*?)<\/a>/si’, $text, $match_array, PREG_SET_ORDER); $return = array() ; foreach ($match_array as $serp) { $full_anchor = $serp[0]; $href = $serp[1]; $anchortext =…

  • Three ways to debug php

    Method 1 – error.log For this to work you need to be coding in a linux environment with php, apache etc setup. This is the best way I have found and what I currently use to debug my applications/web pages. open up a new terminal and type: tail -f /var/log/apache2/error.log This will give you a…

  • list to php array list2phparray

    Code below for a script to take a list and turn it into an array. Comes in pretty useful. <?php if ($_POST[‘list’]) { $splist = explode(“\n”, $_POST[‘list’]); $out = ‘$x = array(‘; foreach ($splist as $line) { $out = $out.”‘$line’, “; } $out = substr($out,0,-1); $out = substr($out,0,-1); $out = $out.’);’; echo $out; } else…

  • Prosper202 Hacks and Modifications

    Prosper202 Hacks and Modifications

    JiM’s Prosper202 mods 1) increase session life (stops it locking you out every few minutes) add the following line just before session_start(); in 202-config/connect.php ini_set(‘session.gc_maxlifetime’,99999); 2) Cchange the first page you see. edit 202-login.php line 80: header(‘location: /202-account’);  to   header(‘location: /tracking202’); or /tracking202/spy/ If you are doing email submits or any volume loging into spy…

  • Dynamically modifying the landing page with TrafficVance using php

    Dynamically modifying the landing page with TrafficVance using php

    I ran into a silly issue today when dynamically modifying a landing page using TrafficVance. The script I was using was a pretty straight forward: <?php if ($_GET[‘t202kw’]) { $kw = strip_tags($_GET[‘t202kw’]); } if(strpos($kw,’jetinternetmarketing.co.uk’) !== false) { $page = ‘<h1>Dont target JiM on traffic Vance</h1>’; } ?> The problem was that the url I was…