PURL Redirect Failed to Work

During the campaign setup, if you get the PURL Redirect Failed to Work error, a likely cause is that  allow_url_fopen is disabled.  

Replacing default PURL code

So a quick workaround is to use PHP's curl function to communicate with Purlem's API.  

If you are receiving this error, try replacing the exisiting "PURL CODE" at the top of the index.php file (The file that Purlem created on your server) with the following:

$curl = @curl_init(); curl_setopt ($curl, CURLOPT_URL, 'http://www.purlapi.com/lp/index.php?ID='.$_GET["ID"].'&name='.$_GET["name"].'&page='.$_GET["page"].'&test='.$_GET["test"].''); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec ($curl); curl_close ($curl); if(empty($data)) { echo 'PURL Not Found'; exit; } $visitor = json_decode($data); /*Begin Campaign Redirect*/if($visitor->{'purlpage'} && (stristr($_SERVER['REQUEST_URI'], $visitor->{'purlpage'})) === FALSE) { header('Location: '.$visitor->{'url'}.'/'.$visitor->{'purlpage'}.'?ID='.$_GET["ID"].'&name='.$_GET["name"].'&page='.$_GET["page"].'&mobile='.$mobile.'&qr='.$_GET["qr"].'&test='.$_GET["test"]); } /*End Campaign Redirect*/ @session_start(); if($_GET['username']) $_SESSION['visitor']=$_GET['username']; if($visitor->{'login'} && ($_SESSION['visitor'] != $visitor->{'firstName'}.''.$visitor->{'lastName'})) { echo $visitor->{'login'}; exit; }