James Bachini

April 2015

  • Setting up Maxmind GEOIP2 Legacy Database with PHP or Javascript

    This is the php code I use to access geoip data from Maxmind’s geoip database: <?php $gpath = getcwd() . “/GeoIPCity.dat”; if (isset($_SERVER[‘HTTP_X_FORWARDED_FOR’])) { $myip = $_SERVER[‘HTTP_X_FORWARDED_FOR’]; } if (isset($_SERVER[‘REMOTE_ADDR’])) { $myip = $_SERVER[‘REMOTE_ADDR’]; } include(“./geoipcity.inc”); $gi = geoip_open($gpath,GEOIP_STANDARD); $record = geoip_record_by_addr($gi,$myip); $city = $record->city; $countrycode = $record->country_code; geoip_close($gi); echo ‘countrycode = “‘.$countrycode.’”; city =…

  • Dealing With Googles Mobile Friendly Algorithm

    From the 21st April Google will be penalising sites for mobile search which don’t appear mobile friendly. You can test your site here: https://www.google.com/webmasters/tools/mobile-friendly/ If you haven’t done any mobile design you’ll probably get some warnings like this: Text too small to read Links too close together Mobile viewport not set Content wider than screen…

  • Golden Gems in Copywriting

    Copywriting is an essential skill in affiliate marketing. Being able to persuade a user to complete an action comes down to communication and a lot of the communication on a website or landing page is written text. When I write copy I follow a build > breakdown > rebuild workflow. What this means is I’ll…

  • WhatsApp being used for spam

    This is the first time I’ve seen spam on WhatsApp in the UK. I got two messages from different numbers advertising the same site. I’d imagine they are utilising free sims along with an android bot of some sort to register an account and then target known mobile numbers from a list.

  • SEO for Fun and Profit

    SEO for Fun and Profit

    SEO Summary Search engine optimisation can be broken down into onsite and offsite factors. Onsite Factors Domain age Domain relevance (Topics throughout site) Domain name relevance (keyword.com) Domain registration factors such as renewal date and private whois Site speed, page load times Site freshness, new daily content Title relevancy Keywords in meta description H1 tag…

  • The intelligent investor – April’s Book of the Month

    The intelligent investor is to fund managers what cashvertising is to marketers. First published in the mid twentieth century it now comes with an updated commentary which is as good as the book itself. Graham inspired a host of famous investors including Warren Buffett and this book mirrors my own opinions about going against the…