Category: Code

Alert box on click through to offer 3

Alert box on click through to offer

The following example will allow you to create an alert box when the user clicks through from your landing page to the offer page. This can be useful to remind users of...

RAM & CPU usage PHP script 6

RAM & CPU usage PHP script

Update April 2020 This single file, server health check, written in PHP. It was getting a lot of downloads so I’ve updated the code and open sourced it on Github. You can...

Calculate distance between two geocooridnates 9

Calculate distance between two geocooridnates

Here is a javascript function to calculate the distance between two latitude and longitude coordinates. function deg2rad(deg) { return deg * (Math.PI/180) } function calcDistance(lat1,lon1,lat2,lon2) {   var R = 6371; //...

Option to Disable Adsense Ads 10

Option to Disable Adsense Ads

In some cases it is beneficial to provide a link or option for visitors to a site not to see the adsense ads the first time they visit a page. Ads can...

Automatic Redirect for Mobile Landing Page

Automatic Redirect for Mobile Landing Page

Want a mobile lander with a 90%+ “CTR”? Simply add the following javasript: <script> function go() { location.href = ‘http://www.jamesbachini.com’; } function init() { setTimeout(function() { confirm(‘You have two friends who recommended...