Author Topic: Need click-xtra.php for additional handling...  (Read 4122 times)

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
Need click-xtra.php for additional handling...
« on: March 07, 2007, 07:59:33 am »
Hi,

I have an idea on some customized promotion I want to do.  It requires that I get the email address of the person right after they click, and move it over to another marketing system.

From what I see the easiest way to do this would be with a click-xtra.php script  - as long as that can receive, or have the email address of the person that clicked passed to it.   That way I could do the conditional coding I need for every click and possibly moving the email address, etc...

How about it DW, can you insert a call to click-xtra.php and pass it the email address, and list info (user id?) required to grab the list this person was on when they clicked, as well as the email address - perhaps just passing it the UserID would be sufficient... anyway, I need you help locating the line of code, and also hope you can make it available in future versions, so placing it in the code somewhere permanently.  Can you help out?

BTW - this is different and separate from the move-xtra.php script, which I will also need, I just haven't had the time to sit down with that and make all of the updates/changes to my lists yet, but I'm sure I'll need that as well.

Thanks!  :D
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
bump...
« Reply #1 on: March 08, 2007, 06:32:23 am »
bump...

DW - did you see this?
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Need click-xtra.php for additional handling...
« Reply #2 on: March 09, 2007, 01:48:05 am »
I apologize for the delay.  In link.php change this:
Code: [Select]
 // track hit
  $tdate = date("Y-m-d H:i:s");
  if($ktrk==1){
   // get the user's data
   $result = mysql_query("select id from $utable where uid = '$userid'");
   list($uid) = mysql_fetch_row($result);
  }

To this:
Code: [Select]
 // track hit
  $tdate = date("Y-m-d H:i:s");
  if($ktrk==1){
   // get the user's data
   $result = mysql_query("select id,uid,list,email,fname,lname from $utable where uid = '$userid'");
   list($uid,$xuid,$list,$email,$fname,$lname) = mysql_fetch_row($result);
   if(file_exists('./click-xtra.php')){
    include('./click-xtra.php');
    mysql_select_db($sqldb,$link);
   }
  }

Then click-xtra.php will look something like this:
Code: [Select]
<?php
/*
-------------------------------------------------------------------------------
  ListMail click-xtra.php - This file will run after a tracked link is clicked in link.php 
  Modify the file and copy it to your MAIN ListMail dir.  It will not be overwritten by updates!

  Place custom commands below, ListMail database link is already in effect as $link, if you need to access another database, use $link2.

  Available variables are loaded from the database just before this script is included.

  $uid - User's automatic numeric ID (note: different from other -xtra scripts for now!)
  $xuid - User's 6 character unique string. (note: $uid in other -xtra scripts!)
  $list - List subscribed to.
  $fname - First name, if available.
  $lname - Last name, if available.
  $email - User's email address.

  NOTE: It is recommended you perform your own list checking to make sure your custom commands run correctly.
  ie:  if($list=='1'){  commands(); exit; }

-------------------------------------------------------------------------------
*/

/*
 // MYSQL CONNECT EXAMPLE
 $sql2u = 'USERNAME';
 $sql2p = 'PASSWORD';
 $sql2d = 'DATABASE';

 $link2 = mysql_connect('localhost',$sql2u,$sql2p) or die('could not connect');
 mysql_select_db($sql2d,$link2);

 // query example
 // listmail DB
 // mysql_query("select id from lm_users where 1",$link);
 // xtra DB
 // mysql_query("select id from yourtable where 1",$link2);
*/

// CUSTOM SCRIPT HERE
// echo "click-xtra.php executing!<br><br>";

// END
?>

Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting