JamesBachini.com

Perfect Site Structure

Perfect Site Structure

It is widely accepted that Google places the most weight on the first 100 links it finds on a web page. With that in mind we can design a website that is...

Looking for an angle 1

Looking for an angle

My most successful campaigns are normally also my most creative and abstract. If you can take an offer and think of a way to promote it which is “outside of the box”...

Mixing php with javascrip – Heredoc

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

Poor mans GeoIP – Quick and Easy Geolocation

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

Two php functions for scraping content and extracting links

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

Three ways to debug php

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

CPA Tips

CPA Tips

Maxbounty tracking with subid in prosper202: /tracking202/static/gpb.php?amount=&subid=#S1# The standard conversion rate I use (probably out of date): //$ > £ = x 0.64 Note that what you buy and sell dollars for...

list to php array list2phparray

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(‘;...

Prosper202 Hacks and Modifications 2

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