urlenconded url用于webmail客户端的统计信息(urlenconded url's for statistics in webmail clients)

编程入门 行业动态 更新时间:2024-10-26 19:34:14
urlenconded url用于webmail客户端的统计信息(urlenconded url's for statistics in webmail clients)

我正在忙着开发自己的新闻通讯系统,我也希望跟踪用户点击的链接。 我在每个网址前加上我自己的统计网址和urlencode原始网址。

例如

<a href="http://www.domain.com/some-page">Go to domain.com</a>

<a href="http://www.mydomain.com/keep-track-of-the-clicks.php?redirect=http%3A%2F%2Fwww.domain.com%2Fsome-page">Go to domain.com</a>

这在邮件客户端中非常有效,但在Webmail客户端中却不行。 他们自动解码编码的url,导致我的脚本出错。

有人知道如何解决这个问题吗?

提前致谢!

I'm busy developing my own newsletter system where I also want to keep track of the links users click. I prefix every url with my my own statistics url and urlencode the original url.

For instance

<a href="http://www.domain.com/some-page">Go to domain.com</a>

Becomes

<a href="http://www.mydomain.com/keep-track-of-the-clicks.php?redirect=http%3A%2F%2Fwww.domain.com%2Fsome-page">Go to domain.com</a>

This works perfect in mail clients but not in webmail clients. They auto decode the encoded url causing errors in my script.

Does anybody know how to work around this?

Thanks in advance!

最满意答案

它实际上就像编码两次一样容易。

<? 'http://www.mydomain.com/keep-track-of-the-clicks.php?redirect=' . urlencode(urlencode($redirect)); ?>

It's actually as easy as encoding it twice.

<? 'http://www.mydomain.com/keep-track-of-the-clicks.php?redirect=' . urlencode(urlencode($redirect)); ?>

更多推荐

本文发布于:2023-07-26 19:51:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1280258.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:统计信息   客户端   url   urlenconded   webmail

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!