Hi
I've got an emailing system where a user inputs their html, uploads a list of email addresses and it sends out the emails.
As part of the process, I log the mails that are opened, read etc.
To do this, I'm currently using a regular expression to find the "href" part, and adding in a new url - e.g.
$bodytext = the html code
$ref = reference of the email
$owner = email address of recipient
eregi_replace ("href=\"", "href=\"http://www.mydomain.com/logging/log.php?ref=$emailref&owner=$owner&id=", $bodytext);
However, this works unless the url itself also has variables: e.g.
http://www.newdomain.com/testpage.asp?a=CHUPPA&Cus=1010101101
Does anyone know how I can parse the text, pull out the urls and replace them with encoded versions of the url ? - just like this message board does!!!