Local installation and external link

Hello,
i came from sugarcrm community eidtion used mainly for email campaigns.
Sugarcrm is installed locally but email links refer to external domain (on external domain is palced a piece of code to adress the local installation to update campaign tracking)
Is it possible the same with phplist ? Any sample of code is available ?

Any help or suggestion would be appreciated.
Thanks in advance,
Stefano

@stefano.campri No phplist does not do that. The links created for click tracking or user tracking are to phplist itself, so phplist must be accessible from the internet.

@duncanc good mornig thank you for your email
Probably i have not clearly stated the situation. Of course phlist create tracking itself and sugar as well. As follow an example of tracking link from sugar http://www.myexampledomain.xxx/crm/index.php?entryPoint=campaign_trackerv2&track=XXXXXXXX-cedc-bbe6-5380-47fa301c18d2&identifier=XXXXX-8902-607f-bd63-62b57d9a4e95
I belive phplist create links similar, is it correct ?
Even if Sugarcrm is not installed on server with registerd domain in can create link with external domain. Because on external domain there is no database and software then on public website needs to add some pice of code for redirection

crmlocation.php

<?php
$crmlocation = 'http://static-ip-address:80/crm';
?>

index.php

<?php
require_once('../mdb-database/crmlocation.php');

function _iscurlinstalled() {
	if  (in_array  ('curl', get_loaded_extensions())) {
		return true;
	}
	else{
		return false;
	}
}

function http_parse_headers($header)
{
$retVal = array();
$fields = explode("\r\n", preg_replace('/\x0D\x0A[\x09\x20]+/', ' ', $header));
foreach( $fields as $field ) {
if( preg_match('/([^:]+): (.+)/m', $field, $match) ) {
$match[1] = preg_replace('/(?<=^|[\x09\x20\x2D])./e', 'strtoupper("\0")', strtolower(trim($match[1])));
if( isset($retVal[$match[1]]) ) {
$retVal[$match[1]] = array($retVal[$match[1]], $match[2]);
} else {
$retVal[$match[1]] = trim($match[2]);
}
}
}
return $retVal;
}

function HTTPost($host, $path, $data_to_send,$user,$pass,$agent) {
$fp = fsockopen($host,80, &$err_num, &$err_msg, 10);
if (!$fp) {
  print "errore";
  echo "$err_msg ($err_num)<br>\n";
} else {
    $auth = $user.":".$pass ;
    $string=base64_encode($auth);
    echo $string;
    fputs($fp, "POST $path HTTP/1.1\r\n");    
    fputs($fp, "Authorization: Basic ".$string."\r\n");
    fputs($fp, "User-Agent: ".$agent."\n");
    fputs($fp, "Host: $host\n");
    fputs($fp, "Content-type: application/x-www-form-urlencoded\n");
    fputs($fp, "Content-length: ".strlen($data_to_send)."\n");
    fputs($fp, "Connection: close\n\n");
    fputs($fp, $data_to_send);
    $res = '';
    for ($i = 1; $i < 10; $i++){
      $reply .= fgets($fp, 256);        
    }  
   fclose($fp);
}
return $reply;
}

if ($_REQUEST['entryPoint'] == 'removeme' || $_REQUEST['entryPoint'] == 'campaign_trackerv2' || $_REQUEST['entryPoint'] == 'image') {
	if (strlen($_REQUEST['identifier']) == 36) {
	        if (strlen($_REQUEST['track']) > 0) {
			   $reply = HTTPost($sugarhost,$sugarindex,"entryPoint=".$_REQUEST['entryPoint']."&identifier=".$_REQUEST['identifier']."&track=".$_REQUEST['track'],"","",$_SERVER['HTTP_USER_AGENT']);
			   $arr = array();
			   $arr = http_parse_headers($reply);
			   if (array_key_exists('Location',$arr)) {
			      header("Location: $arr[Location]");
               }				  
		    } else {
			  HTTPost($sugarhost,$sugarindex,"entryPoint=".$_REQUEST['entryPoint']."&identifier=".$_REQUEST['identifier'],"","",$_SERVER['HTTP_USER_AGENT']);
			}        	  
	}
}
?>

Then the first question is
even if installed over LAN is possible to have phplist creating tracking links like
http : // www.myexampledomain.xxx/afolder/blablablabla
instead of
http : // localhost/blablabla ???

@stefano.campri I don’t really understand what you are trying to do. I suggest installing phplist and trying it out to see whether it works with your approach.

phplist creates a URL to itself for tracking links in campaigns but also when redirecting to itself in the admin interface. There are two settings that are probably relevant

in config.php $pageroot is the path to phplist, the default is '/lists'

in the admin interface on the Settings page Website address (without http://) is the domain or subdomain where phplist is installed. If you enter an entirely different domain here then I think that parts of the admin interface are not going to work.

@duncanc thank you for your email
i opened the thread in order to understand if phplist can work, of course with the necessary modification, as my current installation of sugarcrm : i have sugarcrm installed local (no database and other source code published on the web) and just some picece of .php on the website to redirect campaing tracking to our server with static ip.

My post was to understand if anyone have done this kind of installation already and in case get hint from developer about the source to look at.