James Bachini

May 2016

  • A simple iOS / Android traffic splitter in PHP

    A simple iOS / Android traffic splitter in PHP

    The following basic PHP code will split traffic by device with iOS traffic going to the first out link, Android to the second and leftovers to the third. TIP: This uses a 301 redirect however you can do any type of programmatic variation based on the user agent. You can copy and paste this into…

  • No More Forced Tablet Traffic On Adwords

    No More Forced Tablet Traffic On Adwords

    At last Google has put an end to the way it was allowing bid adjustments for mobile and desktop but not tablets. For years this has meant that Adwords advertisers were forced into getting unwanted tablet traffic and paying the same rate for it as desktop. Here is the blog announcement from Google: http://adwords.blogspot.co.uk/2016/05/ads-and-analytics-innovations-for-a-mobile-first-world.html If…

  • Splitting traffic to different offers on mobile

    Splitting traffic to different offers on mobile

    If you are buying bulk traffic to a mobile offer the chances are that you can split some of your traffic off to different offers. For example if  you have a pin submit that only accepts android but has a much higher payout then you can separate your android traffic and increase your bottom line.…

  • RAM & CPU Usage PHP Script | Server Health Check

    RAM & CPU Usage PHP Script | Server Health Check

    This single file server health check script works on Windows, Linux and possibly others. It is written in PHP to show CPU usage, RAM usage, Incoming Connections and Hard disk usage. Update September 2020 Server Check PHP was getting a lot of downloads so I’ve updated the code and open sourced it on Github. If…

  • Basic exit intent pop up script

    Basic exit intent pop up script

    The following script will launch a pop up and redirect if the user moves the mouse off the page. You can add this to your landing page targeted at desktop users, on mobile it wont work obviously. This is just a basic version but you can change the popUp() function to load an email capture…

  • Resize youtube/vimeo iframe to maximum available height and width

    Resize youtube/vimeo iframe to maximum available height and width

    Here is the code to make a flexible youtube.com or vimeo.com video fit both the height and width of the containing div. Like a flexible adsense unit it will take up the maximum available space on the page or be constrained within a containing object such as a div. CSS: .vcontainer { position:relative; padding-bottom:56.25%; padding-top:30px;…