Re: PHP Code I Must find
| From: | Thijs Lensselink | Date: | Fri, 30 May 2008 12:03:30 +0000 |
| Subject: | Re: PHP Code I Must find | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-274876@lists.php.net to get a copy of this message | ||
Quoting John Taylor-Johnston <jt.johnston@USherbrooke.ca>:
Seen that in the manual. I'll need a routine of some sort I guess. I'll get my cookie cutters out tomorrow and see what I can create. I make cool gingerbread men, for a dude. **htmlentities() does most of what I want, sort of. **lists-php wrote:You could do something like this (knowing the strings are pure ascii) function ascToEnt($string) {you might try looking at the php manual. start with: http://www.php.net/manual/en/function.ord.php and go from there.--<?php $mystring = "me@foo.com"; # How can I generate $mystring in ascii characters? echo ($mystring in ascii charachters); ?> lists-php wrote:---------- End Original Message ----------that's not UTF, rather just the html representation of the ascii codes for the characters. [someone else has already pointed you to an ascii table.] when put in the context of the "mailto:" it's actually fairly easy for a bot to identify and decode (i'm not saying that they do, but it's not hard). if you're going to use this approach you may want to make the e-mail addresses user-readable, but unlinked. while still easily decoded, most bots won't waste time trying to decode every string like that that they encounter (at least not yet). - Rick ------------ Original Message ------------Date: Thursday, May 29, 2008 07:08:34 PM -0400 From: John Taylor-Johnston <jt.johnston@USherbrooke.ca> To: PHP-General <php-general@lists.php.net> Subject: [PHP] PHP Code I Must find A web site deploys what I think are UTF characters to mask email addresses. Is there there a php function I can use to generate this? Or was this hand-done? It is crackable, but a darned good stab at the problem of spiders at the same. Any feedback, info or code would be appreciated, John John Taylor-Johnston wrote:---------- End Original Message ----------My source is this page: http://www.grandlodge.mb.ca/contact.html John--PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php/<div align="center">To report a technical problem with this site please <a href="mailto:webmaste&# 11 4;@grandlodg& #1 01;.mb.ca">contact the webmaster</a>.</div>/ /In UTF code: mailto:webmaster&# 06 4;grandlodge& #0 46;mb.ca would be this in latin characters: mailto:webmaster@grandlodge.mb.ca/
$char = '';
$strLength = strlen($string);
for ($x = 0; $x < $strLength; $x++) {
$char .= '&#' . ord($string{$x}) . ';';
}
return $char;
}
echo ascToEnt('test@test.tld');