Author: James

0

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” then you are on to a winner. Coming up with the idea is the difficult bit and I’ve laid out an example of one campaign I have used in the past to promote an offer. Start with the...

Mixing php with javascrip – Heredoc 0

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 a start and end point, example below. // Heredoc string // $sstring = <<<TEST Hello World TEST; The word TEST could be anything and it wont finish inputing the string until it comes across it again. This is...

Poor mans GeoIP – Quick and Easy Geolocation 0

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 yadda; }

Two php functions for scraping content and extracting links 0

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 extract_links($text) { preg_match_all(‘/<\s*a[^<>]*?href=[\’”]?([^\s<>\’”]*)[\’”]?[^<>]*>(.*?)<\/a>/si’, $text, $match_array, PREG_SET_ORDER); $return = array() ; foreach ($match_array as $serp) { $full_anchor = $serp[0]; $href = $serp[1]; $anchortext = $serp[2]; if ( (preg_match(“/http:/i”,$href)) && (!preg_match(“/cache/i”,$href)) && (!preg_match(“/google.com/i”,$href)) && (!preg_match(“/youtube.com/i”,$href)) && (!preg_match(“/wikipedia.org/i”,$href)) && ($href[0]!= ‘/’)...

Three ways to debug php 0

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 I currently use to debug my applications/web pages. open up a new terminal and type: tail -f /var/log/apache2/error.log This will give you a readout of the last few error messages. Refresh the page you are working on in...

CPA Tips 0

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 is very different, 2-4% Consider setting up US bank account. Not possible without visiting the states to the best of my knowledge. Phi ( I use this in design more than anything, if you don’t know what it...

list to php array list2phparray 0

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(‘; foreach ($splist as $line) { $out = $out.”‘$line’, “; } $out = substr($out,0,-1); $out = substr($out,0,-1); $out = $out.’);’; echo $out; } else { echo ‘<html><body>’; echo ‘<h1>List 2 php array</h1>’; echo ‘<form action=”list2phparray.php” method=”post”> <textarea cols=”100″ rows=”30″...

0

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. edit 202-login.php line 80: header(‘location: /202-account’);  to   header(‘location: /tracking202’); or /tracking202/spy/ If you are doing email submits or any volume loging into spy is about as helpful as a kick up the arse so just change it to...

0

Dynamically modifying the landing page with TrafficVance using php

I ran into a silly issue today when dynamically modifying a landing page using TrafficVance. The script I was using was a pretty straight forward: <?php if ($_GET[‘t202kw’]) { $kw = strip_tags($_GET[‘t202kw’]); } if(strpos($kw,’jetinternetmarketing.co.uk’) !== false) { $page = ‘<h1>Dont target JiM on traffic Vance</h1>’; } ?> The problem was that the url I was using in Traffic Vance was http://www.jetinternetmarketing.co.uk/lander.php?t202kw={KeyWord} my target for example was: jetinternetmarketing.co.uk The script wasnt...

0

Welcome to the blog

Thanks for visiting this is the first post at JiM’s Blog. To tell you a little about why we are starting a blog could take a while but in short we are trying to improve our communications throughout the industry and this is one method we are using. If you are interested in getting in contact there is a email address on the contact page I hope you will find...