HEX
Server: Apache
System: Linux www3.pit.tblive.com 5.14.0-687.38.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 12 17:19:12 EDT 2026 x86_64
User: awaldron (1020)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/thread-self/root/home/awaldron/www/archive/tbl/include/functions/f_mail_encode.php
<?php
/*
 * URL Encoder script.
 * Version 1.0 - February 2002
 * (c) 2002, Paul Gregg <pgregg@pgregg.com>
 * http://www.pgregg.com
 *
 * Function: Take an href link and the visible text and make an obfuscated
 * link to prevent search engines (or spam harvesters) from picking it up.
 *
 * Open Source Code:   If you use this code on your site for public
 * access (i.e. on the Internet) then you must attribute the author and
 * source web site: http://www.pgregg.com/projects/
 * You must also make this original source code available for download
 * unmodified or provide a link to the source.  Additionally you must provide
 * the source to any modified or translated versions or derivatives.
 *
 * PHP function-ised version.
 */


  Function transpose($str) {
    # function takes the string and swaps the order of each group of 2 chars
    $len = strlen($str);
    $ret = "";
    for ($i=0; $i<$len; $i=$i+2) {
      if ($i+1 == $len)
        $ret .= substr($str, $i, 1);
      else
        $ret .= sprintf("%s%s", substr($str, $i+1, 1), substr($str, $i, 1));
    }
    return $ret;
  }
  
  Function escapeencode ($str) {
    $ret = "";
    $arr = unpack("C*", $str);
    foreach ($arr as $char)
      $ret .= sprintf("%%%X", $char);
    return $ret;
  }
  
  Function encodelink($href, $text) {
    $code = sprintf("var s='%s';var r='';for(var i=0;i<s.length;i++,i++){r=r+s.substring(i+1,i+2)+s.substring(i,i+1)}document.write('<a href=\"'+r+'\">%s</a>');", transpose($href), $text);
    $UserCode = sprintf("%s%s%s",
    "<script type=\"text/javascript\">\n<!--\neval(unescape('",
    escapeencode($code),
    "'));\n-->\n</script>");
      return $UserCode;
  }
?>