我有使用 preg_match_all 查找电子邮件正文中出现的代码。像这样的东西:
$sHrefPattern = "<(a|area)\s*.*(unsubscribe_url\s*=\s*?)([\"\']??)([^\" >]*?)";
if (preg_match_all("/$sHrefPattern/siU", $sHtmlBody, $aMatches, PREG_SET_ORDER)) {
// do smth ...
}
和这样的内容(可以包含俄语文本):
... <td align="left" colspan="3" height="22" valign="center">
<a style="font-size: 8pt; color: #666; padding-left: 13px; font-family: arial;" unsubscribe_url="http://ourcliensite.org/unsubscribe.html">
Unsubscribe
</a> |
<a href="http://ourservice.com/linkswrap?did=819&sid=1&link=http%3A%2F%2Fwww.ourclinetsite.org&dig=7bef6d9ed912392a689bdb9bb6cc581d" style="font-size: 8pt; color: #666; padding-left: 13px; font-family: arial;">
Advertisement in emails
</a>
</td> ...
很长一段时间以来,这段代码都运行良好。但是有一天,这段代码停止了正常工作。我认为这与某些软件包安装有关,但我不知道安装了哪个软件包。此代码正在运行的服务器已在我们的团队中共享访问权限。有任何想法吗?
uname -a
Linux ourhost 2.6.32-042stab076.8 #1 SMP Tue May 14 20:38:14 MSK 2013 i686 i686 i386 GNU/Linux