Category: Code

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

Loading a conversion pixel on click through 0

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 etc. It’ll be tracking click throughs rather than conversions so it’s not perfect but it...

iframe to a specific div id on a landing page 0

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 of the php page. The height and width of the iframe can be adjusted further...

Mobile Multivariate Testing with SubID’s 0

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 direct linking straight to Neverblue’s platform which has multiple subid’s. I decided the best way...

Prosper202 Mod – Set preferences before crashing server 0

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 knocked up a quick mod so you can set preferences before attempting to run a...

What was that Country Code? 1

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 = Afghanistan AG = Antigua and Barbuda AI = Anguilla AL = Albania AM = Armenia...

Bing URL Ripper for Dorks 0

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) search = search.gsub(‘ ‘, ‘+’) linksinc = Array.new paths =[‘/search?q=’ + search, ‘/search?q=’ + search...

UK Postcodes for major cities 0

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 working $postcode[‘Glasgow’] = ‘G22EN’; $postcode[‘Sheffield’] = ‘S38LN’; $postcode[‘Bradford’] = ‘BD12DH’; //not working $postcode[‘Edinburgh’] = ‘EH11JT’;...

Ruby & Selenium Script to Check Google SERP ranks 0

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 -jar ‘ + File.dirname(__FILE__) + ‘/../../selenium-server.jar &’) system(‘sleep 3’) $quickcheckres = Array.new #logfile dcom =...

Captcha Cracker For PHPBB written in Ruby 0

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, ruby and imagemagick to run it. apt-get is your friend. It works by first cleaning...