h1

How to do email read notification in PHP

julho 4, 2006
How to do email read notification in PHP

Dec 9th, 2005 02:04
Morne Roets, Rupak Dum,

Well there are a few ways.
But the main problem is that these day’s withall the spam filters it’s not easy to do tracking anymore.
And you don’twant to be added to the “spam” list on all the mail servers by onlydoing “read tracking report”.

The method i use “WEB BEACON” is relative safe and “almost”undetectable.
The only problem is that the person that reads the emailmust be able to view images in the HTML email or
click on the “downloadimage” link in Outlook 2000 and above.

What we do is we create an HTML email and add this “image tag” anywhereon the Email.

//=========== In the html email ======
<imgsrc=”http://www.youserver.com/newsletter_report.php?email=emailofuser “border=”0″ width=”150″ height=”40″>
//=========== End Email ==============

Most people just use a blank 1×1 pix image but i’ve used my companys’logo as my “web bugs” or “WEB BEACON”.

This means that when the user click on “download all images” Outlookwill request the newsletter_report.php
script waiting for a image response.

The next part is actually easy …

//============= In your newsletter_report.php script ==============

function sendGIF(){

// open the file in a binary mode
$name = “sentBy8.png”;

//Open and read in binary
$fp = fopen($name, ‘rb’);

// send the right headers
header(“Content-Type: image/gif”);
header(“Content-Length: ” . filesize($name));

// dump the picture and stop the script
fpassthru($fp);
}

// Make sure image is sent to the browser immediately
ob_implicit_flush(TRUE);

// keep running after browser closes connection
@ignore_user_abort(true);

sendGIF();

// Browser is now gone…

// Switch off implicit flush again – we don’t want to send any more output
ob_implicit_flush(FALSE);

// Catch any possible output (e.g. errors)// – probably not needed but better safe…
ob_start();

//Start your processing here…

// ============== Ens script ==================================

When outlook request the newsletter_report.php script we send an imageback on do tracking on
the $_REQUEST vars passed from the link in the email.

You can even take this script to the next level and do tracking for howlong the email
was opened etc … :-)

Just remember that this type of tracking is often know as spyware. Butyou can just notify
your newsletter clients that you do open ratetracking for advertising purposes. (In the small
print)

Hope this helps, i’ve researched all possible tracking options, but thisis the best by far.Tip:
make your HTML Email with a lot of images to “force” the reader todownload all the offside images.

h1

Problemas para passar valores via scriptaculous !!

abril 28, 2006

Página q faz as requisições:

Utilizo 2 métodos aqui, ajax.autocompleter e ajax.updater (eu escrevo nesse input abaixo, qdo seleciono algo nele, disparo um script q executa o uploader q deveria colocar valores em 2 outros inputs abaixo – esse passo q não consegui fazer ainda)

#input 1
<INPUT class=”txtPadrao200″ autocomplete=”off” id=”txtCodPatrimonio” name=”txtCodPatrimonio”>

#span com imagem para indicar processamento
<span id=”addressProgress” style=”display:none;”><img src=”../../imagens/indicator_tiny_red.gif”/></span>

#div onde lista o resultado do autocomplete
<div class=”auto_complete” id=”contact_name_auto_complete”></div>

#script do autocomplete:
<script type=”text/javascript”>
   new Ajax.Autocompleter(‘txtCodPatrimonio’, ‘contact_name_auto_complete’, ‘world.asp’, { tokens: [',', '\n'], indicator:’addressProgress’, afterUpdateElement:buscaHTML } );
</script>

#script disparado qdo escolhido o valor do autocomplete:
function buscaHTML()
{

var url = ‘world.asp’;

var pars = ‘txtUnidade=’+document.form1.txtCodPatrimonio.value;

var myAjax = new Ajax.Updater( ‘resposta_aqui’, url, { method: ‘get’, parameters: pars, onComplete:troca });
}

O script “troca” é q não consegui montar, pois não sei como pegar os valores do updater e jogar nos input text, justamente pelo fato de retornar com <ul><li>, q é o mesmo caso acredito q o Ney tem.

Alguma dica?

Valew.

new Ajax.Autocompleter(‘txtCodPatrimonio’, ‘contact_name_auto_complete’, ‘world.asp’, { tokens: [',', '\n'], indicator:’addressProgress’, afterUpdateElement:buscaHTML }

h1

Uso de Ajax.Updater com o Ajax.Autocompleter

abril 27, 2006

<script>
function buscaHTML()
{
var url = 'world.asp';
var pars = 'txtUnidade='+document.form1.txtUnidade.value;
var myAjax = new Ajax.Updater( 'resposta_aqui', url, { method: 'get', parameters: pars });
}
</script>

new Ajax.Autocompleter('txtUnidade', 'contact_name_auto_complete', 'world.asp', { tokens: [',', '\n'], indicator:'addressProgress', afterUpdateElement:buscaHTML })

<div id="resposta_aqui"></div>

h1

Acentuação em Ajax

abril 25, 2006
  Acentos no Ajax
 

 

Descobri uma coisa legal e to mandando para vocês…

Como colocar acentos em aplicação com Ajax! Na pagina que recebe os dados:

(Na primeira linha)

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”pt-br” lang=”pt-br”>

Na pagina que envia os dados, precisa colocar…

EM ASP:
Response.AddHeader “Content-Type”, “text/html; charset=iso-8859-1″

EM PHP:
header(“Content-Type: text/html; charset=iso-8859-1″);

É isso, qualquer coisa estamos ae.

h1

Usos de options do scriptaculous

abril 25, 2006

new Ajax.Autocompleter('contact_name', 'contact_name_auto_complete',
'http://localhost/ajax/act_people.cfm',
{ afterUpdateElement:loadSelection(element,selectedElement),
paramName:"contact", frequency:0.1 })


INPUT class="txtPadrao200" autocomplete="off" id="txtUnidade" name="txtUnidade"

span id="addressProgress" style="display:none;"
img src="../../imagens/indicator_tiny_red.gif"
/span

div class="auto_complete" id="contact_name_auto_complete"
/div

script type="text/javascript"

/*
aqui é onde toda a mágica acontece!
contact_name é o nome do input onde é digitado as letras iniciais
contact_name_auto_complete é o nome da div onde será mostrado o resultado
busca_nomes_ajax.php é o php q será executado a cada letra digitada e retonará a lista de nomes
*/

new Ajax.Autocompleter('txtUnidade', 'contact_name_auto_complete', 'world.asp', { tokens: [',', '\n'], indicator:'addressProgress' })

/script

h1

Efeitos usando Scriptaculous

abril 24, 2006

<tr><td>
<script>
Effect.OpenUp = function(element) {
element = $(element);
new Effect.BlindDown(element, arguments[1] || {});
}

Effect.CloseDown = function(element) {
element = $(element);
new Effect.BlindUp(element, arguments[1] || {});
}

Effect.Combo = function(element) {
element = $(element);
if(element.style.display == 'none') {
new Effect.OpenUp(element, arguments[1] || {});
}else {
new Effect.CloseDown(element, arguments[1] || {});
}
}
</script>
<div id="meudiv" onclick="Effect.Fade(this,{duration:3})">Fade me slower!</div>
<div id="aqui" style="display: none;">Lorem ipsum dolor sit amet.</div>
<a href="javascript:Effect.toggle('meudiv','appear');">Click Here</a>

</td></tr>

Seguir

Obtenha todo post novo entregue na sua caixa de entrada.