如何解码电子邮件?
我正在抓取一页,其中有类似的电子邮件<代码>...mailto:St ;& ;#101;wart.Smi.. .和类似的。它已被解码,我如何用 PHP 对其进行编码?谢谢(仅用于教育目的)。
I am scraping one page and it has e-mails like ...mailto:Stewart.Smi...
and similar. It is decoded, how could I encode it with PHP? Thanks (only for education purposes).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这些只是普通的 ASCII 字符,由于神秘的原因,它们被编码为 HTML 数字字符格式。即字母“a”被编码为
`
。常用编码列表
内置 php 函数 常见 编码列表 php.net/manual/en/function.html-entity-decode.php" rel="nofollow">html-entity-decode() 应该将它们转换回可读的 utf-8。
These are just ordinary ASCII characters which for mysterious reasons have been encoded in HTMLs numeric character format. i.e. the letter "a" is coded as
`
.A list of common encodings
The built in php function html-entity-decode() should convert these back to readable utf-8.
尝试
html_entity_decode()
获取编码值。例如:
try
html_entity_decode()
to get the encoded value.for ex:
每个实体都是一个字符的十进制表示。此 Perl 代码将转换简单的 ASCII。
输出
Each entity is the decimal representation of a character. This Perl code will translate simple ASCII.
OUTPUT